Skip to content

Commit 6717e66

Browse files
authored
Add Windows to Github Action CI matrix (openml#1095)
* Add Windows to Github Action CI matrix * Fix syntax, disable Ubuntu tests Ubuntu tests only temporarily disabled for this PR, to avoid unnecessary computational costs/time. * Fix syntax for skip on install Python step * Explicitly add the OS to includes * Disable check for files left behind for Windows The check is bash script, which means it fails on a Windows machine. * Re-enable Ubuntu tests * Replace Appveyor with Github Actions for WindowsCI
1 parent f16ba08 commit 6717e66

File tree

5 files changed

+26
-146
lines changed

5 files changed

+26
-146
lines changed

.github/workflows/ubuntu-test.yml renamed to .github/workflows/test.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,34 @@ name: Tests
33
on: [push, pull_request]
44

55
jobs:
6-
ubuntu:
7-
8-
runs-on: ubuntu-latest
6+
test:
7+
name: (${{ matrix.os }}, Py${{ matrix.python-version }}, sk${{ matrix.scikit-learn }})
8+
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
1111
python-version: [3.6, 3.7, 3.8]
1212
scikit-learn: [0.21.2, 0.22.2, 0.23.1, 0.24]
13+
os: [ubuntu-latest]
1314
exclude: # no scikit-learn 0.21.2 release for Python 3.8
1415
- python-version: 3.8
1516
scikit-learn: 0.21.2
1617
include:
1718
- python-version: 3.6
1819
scikit-learn: 0.18.2
1920
scipy: 1.2.0
21+
os: ubuntu-latest
2022
- python-version: 3.6
2123
scikit-learn: 0.19.2
24+
os: ubuntu-latest
2225
- python-version: 3.6
2326
scikit-learn: 0.20.2
27+
os: ubuntu-latest
2428
- python-version: 3.8
2529
scikit-learn: 0.23.1
2630
code-cov: true
31+
os: ubuntu-latest
32+
- os: windows-latest
33+
scikit-learn: 0.24.*
2734
fail-fast: false
2835
max-parallel: 4
2936

@@ -32,6 +39,7 @@ jobs:
3239
with:
3340
fetch-depth: 2
3441
- name: Setup Python ${{ matrix.python-version }}
42+
if: matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.7.9)
3543
uses: actions/setup-python@v2
3644
with:
3745
python-version: ${{ matrix.python-version }}
@@ -50,12 +58,17 @@ jobs:
5058
id: status-before
5159
run: |
5260
echo "::set-output name=BEFORE::$(git status --porcelain -b)"
53-
- name: Run tests
61+
- name: Run tests on Ubuntu
62+
if: matrix.os == 'ubuntu-latest'
5463
run: |
5564
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
5665
pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov --reruns 5 --reruns-delay 1
66+
- name: Run tests on Windows
67+
if: matrix.os == 'windows-latest'
68+
run: | # we need a separate step because of the bash-specific if-statement in the previous one.
69+
pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv --reruns 5 --reruns-delay 1
5770
- name: Check for files left behind by test
58-
if: ${{ always() }}
71+
if: matrix.os != 'windows-latest' && always()
5972
run: |
6073
before="${{ steps.status-before.outputs.BEFORE }}"
6174
after="$(git status --porcelain -b)"
@@ -71,4 +84,4 @@ jobs:
7184
with:
7285
files: coverage.xml
7386
fail_ci_if_error: true
74-
verbose: true
87+
verbose: true

appveyor.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

appveyor/run_with_env.cmd

Lines changed: 0 additions & 88 deletions
This file was deleted.

doc/progress.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
Changelog
77
=========
88

9+
0.13.0
10+
~~~~~~
11+
12+
* MAIN#1088: Do CI for Windows on Github Actions instead of Appveyor.
13+
14+
915
0.12.2
1016
~~~~~~
1117

tests/test_runs/test_run_functions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,7 @@ def _check_sample_evaluations(
366366
evaluation = sample_evaluations[measure][rep][fold][sample]
367367
self.assertIsInstance(evaluation, float)
368368
if not (os.environ.get("CI_WINDOWS") or os.name == "nt"):
369-
# Either Appveyor is much faster than Travis
370-
# and/or measurements are not as accurate.
371-
# Either way, windows seems to get an eval-time
372-
# of 0 sometimes.
369+
# Windows seems to get an eval-time of 0 sometimes.
373370
self.assertGreater(evaluation, 0)
374371
self.assertLess(evaluation, max_time_allowed)
375372

0 commit comments

Comments
 (0)