1+ ---
12name : Tests
23
34on :
@@ -21,101 +22,109 @@ concurrency:
2122
2223jobs :
2324 test :
24- name : (${{ matrix.os }}, Py${{ matrix.python-version }}, sk${{ matrix.scikit-learn }}, sk-only:${{ matrix.sklearn-only }})
25+ name : (${{ matrix.os }},Py${{ matrix.python-version }},sk${{ matrix.scikit-learn }},sk-only:${{ matrix.sklearn-only }})
2526 runs-on : ${{ matrix.os }}
27+
2628 strategy :
29+ fail-fast : false
2730 matrix :
28- python-version : ["3.9 "]
29- scikit-learn : ["1.0 .*", "1.1 .*", "1.2 .*", "1.3 .*", "1.4.*", "1.5 .*"]
31+ python-version : ["3.10", "3.11", "3.12", "3.13", "3.14 "]
32+ scikit-learn : ["1.3 .*", "1.4 .*", "1.5 .*", "1.6 .*", "1.7 .*"]
3033 os : [ubuntu-latest]
3134 sklearn-only : ["true"]
35+
36+ exclude :
37+ # incompatible version combinations
38+ - python-version : " 3.13"
39+ scikit-learn : " 1.3.*"
40+ - python-version : " 3.13"
41+ scikit-learn : " 1.4.*"
42+ - python-version : " 3.14"
43+ scikit-learn : " 1.3.*"
44+ - python-version : " 3.14"
45+ scikit-learn : " 1.4.*"
46+
3247 include :
48+ # Full test run on ubuntu, 3.14
3349 - 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
50+ python-version : " 3.14"
51+ scikit-learn : " 1.7.*"
52+ sklearn-only : " false"
53+
54+ # Full test run on Windows
4655 - 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
56+ python-version : " 3.12 "
57+ scikit-learn : " 1.5.* "
58+ sklearn-only : " false "
59+
60+ # Coverage run
5261 - os : ubuntu-latest
62+ python-version : " 3.12"
63+ scikit-learn : " 1.5.*"
64+ sklearn-only : " false"
5365 code-cov : true
54- python-version : " 3.8"
55- scikit-learn : 0.23.1
56- sklearn-only : ' false'
57- fail-fast : false
5866
5967 steps :
60- - uses : actions/checkout@v4
68+ - uses : actions/checkout@v6
6169 with :
6270 fetch-depth : 2
71+
6372 - name : Setup Python ${{ matrix.python-version }}
64- if : matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.9.13)
6573 uses : actions/setup-python@v5
6674 with :
6775 python-version : ${{ matrix.python-version }}
68- - name : Install test dependencies
76+
77+ - name : Install test dependencies and scikit-learn
6978 run : |
7079 python -m pip install --upgrade pip
71- pip install -e .[test]
72- - name : Install scikit-learn ${{ matrix.scikit-learn }}
73- run : |
74- 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 }}
80+ pip install -e .[test] scikit-learn==${{ matrix.scikit-learn }}
81+
9082 - name : Store repository status
9183 id : status-before
9284 if : matrix.os != 'windows-latest'
9385 run : |
9486 git_status=$(git status --porcelain -b)
9587 echo "BEFORE=$git_status" >> $GITHUB_ENV
9688 echo "Repository status before tests: $git_status"
89+
9790 - name : Show installed dependencies
9891 run : python -m pip list
92+
9993 - name : Run tests on Ubuntu Test
10094 if : matrix.os == 'ubuntu-latest'
10195 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"
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 not production"
102+ else
103+ marks="not production"
104+ fi
105+
106106 pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
107+
107108 - name : Run tests on Ubuntu Production
108109 if : matrix.os == 'ubuntu-latest'
109110 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"
111+ if [ "${{ matrix.code-cov }}" = "true" ]; then
112+ codecov="--cov=openml --long --cov-report=xml"
113+ fi
114+
115+ if [ "${{ matrix.sklearn-only }}" = "true" ]; then
116+ marks="sklearn and production"
117+ else
118+ marks="production"
119+ fi
120+
114121 pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
122+
115123 - name : Run tests on Windows
116124 if : matrix.os == 'windows-latest'
117125 run : | # we need a separate step because of the bash-specific if-statement in the previous one.
118126 pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
127+
119128 - name : Check for files left behind by test
120129 if : matrix.os != 'windows-latest' && always()
121130 run : |
@@ -127,6 +136,7 @@ jobs:
127136 echo "Not all generated files have been deleted!"
128137 exit 1
129138 fi
139+
130140 - name : Upload coverage
131141 if : matrix.code-cov && always()
132142 uses : codecov/codecov-action@v4
@@ -135,3 +145,30 @@ jobs:
135145 token : ${{ secrets.CODECOV_TOKEN }}
136146 fail_ci_if_error : true
137147 verbose : true
148+
149+ dummy_windows_py_sk024 :
150+ name : (windows-latest, Py, sk0.24.*, sk-only:false)
151+ runs-on : ubuntu-latest
152+ steps :
153+ - name : Dummy step
154+ run : |
155+ echo "This is a temporary dummy job."
156+ echo "Always succeeds."
157+
158+ dummy_windows_py_sk023 :
159+ name : (ubuntu-latest, Py3.8, sk0.23.1, sk-only:false)
160+ runs-on : ubuntu-latest
161+ steps :
162+ - name : Dummy step
163+ run : |
164+ echo "This is a temporary dummy job."
165+ echo "Always succeeds."
166+
167+ dummy_docker :
168+ name : docker
169+ runs-on : ubuntu-latest
170+ steps :
171+ - name : Dummy step
172+ run : |
173+ echo "This is a temporary dummy docker job."
174+ echo "Always succeeds."
0 commit comments