Skip to content

Commit fd062f7

Browse files
committed
Update test.yml
1 parent 17d690f commit fd062f7

1 file changed

Lines changed: 44 additions & 49 deletions

File tree

.github/workflows/test.yml

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on:
1414
branches:
1515
- main
1616
- develop
17-
1817
concurrency:
1918
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2019
cancel-in-progress: true
@@ -23,99 +22,94 @@ jobs:
2322
test:
2423
name: (${{ matrix.os }}, Py${{ matrix.python-version }}, sk${{ matrix.scikit-learn }}, sk-only:${{ matrix.sklearn-only }})
2524
runs-on: ${{ matrix.os }}
25+
2626
strategy:
27+
fail-fast: false
2728
matrix:
28-
python-version: ["3.9"]
29-
scikit-learn: ["1.0.*", "1.1.*", "1.2.*", "1.3.*", "1.4.*", "1.5.*"]
29+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
30+
scikit-learn: ["1.2.*", "1.3.*", "1.4.*", "1.5.*"]
3031
os: [ubuntu-latest]
3132
sklearn-only: ["true"]
33+
3234
include:
33-
- os: ubuntu-latest
34-
python-version: "3.8" # no scikit-learn 0.23 release for Python 3.9
35-
scikit-learn: "0.23.1"
36-
sklearn-only: "true"
37-
# scikit-learn 0.24 relies on scipy defaults, so we need to fix the version
38-
# c.f. https://github.com/openml/openml-python/pull/1267
39-
- os: ubuntu-latest
40-
python-version: "3.9"
41-
scikit-learn: "0.24"
42-
scipy: "1.10.0"
43-
sklearn-only: "true"
44-
# Do a Windows and Ubuntu test for _all_ openml functionality
45-
# I am not sure why these are on 3.8 and older scikit-learn
35+
# Full test run on Windows
4636
- os: windows-latest
47-
python-version: "3.8"
48-
scikit-learn: 0.24.*
49-
scipy: "1.10.0"
50-
sklearn-only: 'false'
51-
# Include a code cov version
37+
python-version: "3.12"
38+
scikit-learn: "1.5.*"
39+
sklearn-only: "false"
40+
41+
# Coverage run
5242
- os: ubuntu-latest
43+
python-version: "3.12"
44+
scikit-learn: "1.5.*"
45+
sklearn-only: "false"
5346
code-cov: true
54-
python-version: "3.8"
55-
scikit-learn: 0.23.1
56-
sklearn-only: 'false'
57-
fail-fast: false
5847

5948
steps:
6049
- uses: actions/checkout@v4
6150
with:
6251
fetch-depth: 2
52+
6353
- name: Setup Python ${{ matrix.python-version }}
64-
if: matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.9.13)
6554
uses: actions/setup-python@v5
6655
with:
6756
python-version: ${{ matrix.python-version }}
57+
6858
- name: Install test dependencies
6959
run: |
7060
python -m pip install --upgrade pip
7161
pip install -e .[test]
62+
7263
- name: Install scikit-learn ${{ matrix.scikit-learn }}
7364
run: |
7465
pip install scikit-learn==${{ matrix.scikit-learn }}
75-
- name: Install numpy for Python 3.8
76-
# Python 3.8 & scikit-learn<0.24 requires numpy<=1.23.5
77-
if: ${{ matrix.python-version == '3.8' && matrix.scikit-learn == '0.23.1' }}
78-
run: |
79-
pip install numpy==1.23.5
80-
- name: "Install NumPy 1.x and SciPy <1.11 for scikit-learn < 1.4"
81-
if: ${{ contains(fromJSON('["1.0.*", "1.1.*", "1.2.*", "1.3.*"]'), matrix.scikit-learn) }}
82-
run: |
83-
# scipy has a change to the 'mode' behavior which breaks scikit-learn < 1.4
84-
# numpy 2.0 has several breaking changes
85-
pip install "numpy<2.0" "scipy<1.11"
86-
- name: Install scipy ${{ matrix.scipy }}
87-
if: ${{ matrix.scipy }}
88-
run: |
89-
pip install scipy==${{ matrix.scipy }}
66+
9067
- name: Store repository status
9168
id: status-before
9269
if: matrix.os != 'windows-latest'
9370
run: |
9471
git_status=$(git status --porcelain -b)
9572
echo "BEFORE=$git_status" >> $GITHUB_ENV
9673
echo "Repository status before tests: $git_status"
74+
9775
- name: Show installed dependencies
9876
run: python -m pip list
77+
9978
- name: Run tests on Ubuntu Test
10079
if: matrix.os == 'ubuntu-latest'
10180
run: |
102-
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
103-
# Most of the time, running only the scikit-learn tests is sufficient
104-
if [ ${{ matrix.sklearn-only }} = 'true' ]; then marks='sklearn and not production'; else marks='not production'; fi
105-
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
81+
if [ "${{ matrix.code-cov }}" = "true" ]; then
82+
codecov="--cov=openml --long --cov-report=xml"
83+
fi
84+
85+
if [ "${{ matrix.sklearn-only }}" = "true" ]; then
86+
marks="sklearn and not production"
87+
else
88+
marks="not production"
89+
fi
90+
10691
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
92+
10793
- name: Run tests on Ubuntu Production
10894
if: matrix.os == 'ubuntu-latest'
10995
run: |
110-
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
111-
# Most of the time, running only the scikit-learn tests is sufficient
112-
if [ ${{ matrix.sklearn-only }} = 'true' ]; then marks='sklearn and production'; else marks='production'; fi
113-
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
96+
if [ "${{ matrix.code-cov }}" = "true" ]; then
97+
codecov="--cov=openml --long --cov-report=xml"
98+
fi
99+
100+
if [ "${{ matrix.sklearn-only }}" = "true" ]; then
101+
marks="sklearn and production"
102+
else
103+
marks="production"
104+
fi
105+
114106
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
107+
115108
- name: Run tests on Windows
116109
if: matrix.os == 'windows-latest'
117110
run: | # we need a separate step because of the bash-specific if-statement in the previous one.
118111
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
112+
119113
- name: Check for files left behind by test
120114
if: matrix.os != 'windows-latest' && always()
121115
run: |
@@ -127,6 +121,7 @@ jobs:
127121
echo "Not all generated files have been deleted!"
128122
exit 1
129123
fi
124+
130125
- name: Upload coverage
131126
if: matrix.code-cov && always()
132127
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)