Skip to content

CI: Migrate Windows to GHA #45487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:

jobs:
pre_commit:
if: false
name: pre-commit
runs-on: ubuntu-latest
concurrency:
Expand All @@ -35,6 +36,7 @@ jobs:
uses: pre-commit/[email protected]

typing_and_docstring_validation:
if: false
name: Docstring and typing validation
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -101,6 +103,7 @@ jobs:
if: ${{ steps.build.outcome == 'success' }}

asv-benchmarks:
if: false
name: ASV Benchmarks
runs-on: ubuntu-latest
defaults:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/datamanger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:

jobs:
data_manager:
if: false
name: Test experimental data manager
runs-on: ubuntu-latest
services:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:

jobs:
web_and_docs:
if: false
name: Doc Build and Upload
runs-on: ubuntu-latest

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:

jobs:
pytest:
if: false
runs-on: ubuntu-latest
defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
build:
if: false
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Windows

on:
push:
branches:
- main
- 1.4.x
pull_request:
branches:
- main
- 1.4.x
paths-ignore:
- "doc/**"

env:
PYTEST_WORKERS: "auto"
PANDAS_CI: 1

jobs:
pytest:
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
settings: [
[actions-38.yaml, "not slow and not high_memory"],
[actions-39.yaml, "not slow and not high_memory"],
[actions-310.yaml, "not slow and not high_memory"],
]
fail-fast: false
env:
ENV_FILE: ci/deps/${{ matrix.settings[0] }}
PATTERN: ${{ matrix.settings[1] }}
PYTEST_TARGET: pandas
COVERAGE: true
concurrency:
# https://i.8713187.xyzmunity/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.settings[0] }}-${{ matrix.settings[1] }}-windows
cancel-in-progress: true

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache conda
uses: actions/cache@v2
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge
activate-environment: pandas-dev
channel-priority: flexible
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true

- name: Build Pandas
uses: ./.github/actions/build_pandas

- name: Test
run: ci/run_tests.sh
if: always()

- name: Build Version
run: python -c "import pandas; pandas.show_versions();"

- name: Publish test results
uses: actions/upload-artifact@v2
with:
name: Test results
path: test-data.xml
if: failure()

- name: Print skipped tests
run: python ci/print_skipped.py

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: unittests
name: codecov-pandas
fail_ci_if_error: false
70 changes: 35 additions & 35 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,38 @@ variables:

jobs:
# Mac and Linux use the same template
- template: ci/azure/posix.yml
parameters:
name: macOS
vmImage: macOS-10.15

- template: ci/azure/windows.yml
parameters:
name: Windows
vmImage: windows-2019

- job: py38_32bit
pool:
vmImage: ubuntu-18.04

steps:
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
- script: |
docker pull quay.io/pypa/manylinux2014_i686
docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
/bin/bash -xc "cd pandas && \
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
. ~/virtualenvs/pandas-dev/bin/activate && \
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
python setup.py build_ext -q -j2 && \
python -m pip install --no-build-isolation -e . && \
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
failTaskOnFailedTests: true
testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux'
#- template: ci/azure/posix.yml
# parameters:
# name: macOS
# vmImage: macOS-10.15
#
#- template: ci/azure/windows.yml
# parameters:
# name: Windows
# vmImage: windows-2019
#
#- job: py38_32bit
# pool:
# vmImage: ubuntu-18.04
#
# steps:
# # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
# - script: |
# docker pull quay.io/pypa/manylinux2014_i686
# docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
# /bin/bash -xc "cd pandas && \
# /opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
# . ~/virtualenvs/pandas-dev/bin/activate && \
# python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
# pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
# python setup.py build_ext -q -j2 && \
# python -m pip install --no-build-isolation -e . && \
# pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"
# displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'
#
# - task: PublishTestResults@2
# condition: succeededOrFailed()
# inputs:
# testResultsFiles: '**/test-*.xml'
# failTaskOnFailedTests: true
# testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux'
2 changes: 1 addition & 1 deletion ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then
XVFB="xvfb-run "
fi

PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
PYTEST_CMD="${XVFB}pytest -v -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"

if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then
PYTEST_CMD="$PYTEST_CMD --ignore=pandas/tests/plotting/"
Expand Down