@@ -23,99 +23,97 @@ jobs:
2323 test :
2424 name : (${{ matrix.os }}, Py${{ matrix.python-version }}, sk${{ matrix.scikit-learn }}, sk-only:${{ matrix.sklearn-only }})
2525 runs-on : ${{ matrix.os }}
26+
2627 strategy :
28+ fail-fast : false
2729 matrix :
28- python-version : ["3.9 "]
29- scikit-learn : ["1.0 .*", "1.1 .*", "1.2 .*", "1.3 .*", "1.4.*", "1.5 .*"]
30+ python-version : ["3.10", "3.11", "3.12", "3.13 "]
31+ scikit-learn : ["1.3 .*", "1.4 .*", "1.5 .*", "1.6 .*", "1.7 .*"]
3032 os : [ubuntu-latest]
3133 sklearn-only : ["true"]
34+
35+ exclude :
36+ # incompatible version combinations
37+ - python-version : " 3.13"
38+ scikit-learn : " 1.3.*"
39+ - python-version : " 3.13"
40+ scikit-learn : " 1.4.*"
41+
3242 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
43+ # Full test run on Windows
4644 - 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
45+ python-version : " 3.12 "
46+ scikit-learn : " 1.5.* "
47+ sklearn-only : " false "
48+
49+ # Coverage run
5250 - os : ubuntu-latest
51+ python-version : " 3.12"
52+ scikit-learn : " 1.5.*"
53+ sklearn-only : " false"
5354 code-cov : true
54- python-version : " 3.8"
55- scikit-learn : 0.23.1
56- sklearn-only : ' false'
57- fail-fast : false
5855
5956 steps :
60- - uses : actions/checkout@v4
57+ - uses : actions/checkout@v6
6158 with :
6259 fetch-depth : 2
60+
6361 - name : Setup Python ${{ matrix.python-version }}
64- if : matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.9.13)
6562 uses : actions/setup-python@v5
6663 with :
6764 python-version : ${{ matrix.python-version }}
68- - name : Install test dependencies
65+
66+ - name : Install test dependencies and scikit-learn
6967 run : |
7068 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 }}
69+ pip install -e .[test] scikit-learn==${{ matrix.scikit-learn }}
70+
9071 - name : Store repository status
9172 id : status-before
9273 if : matrix.os != 'windows-latest'
9374 run : |
9475 git_status=$(git status --porcelain -b)
9576 echo "BEFORE=$git_status" >> $GITHUB_ENV
9677 echo "Repository status before tests: $git_status"
78+
9779 - name : Show installed dependencies
9880 run : python -m pip list
81+
9982 - name : Run tests on Ubuntu Test
10083 if : matrix.os == 'ubuntu-latest'
10184 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"
85+ if [ "${{ matrix.code-cov }}" = "true" ]; then
86+ codecov="--cov=openml --long --cov-report=xml"
87+ fi
88+
89+ if [ "${{ matrix.sklearn-only }}" = "true" ]; then
90+ marks="sklearn and not production"
91+ else
92+ marks="not production"
93+ fi
94+
10695 pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
96+
10797 - name : Run tests on Ubuntu Production
10898 if : matrix.os == 'ubuntu-latest'
10999 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"
100+ if [ "${{ matrix.code-cov }}" = "true" ]; then
101+ codecov="--cov=openml --long --cov-report=xml"
102+ fi
103+
104+ if [ "${{ matrix.sklearn-only }}" = "true" ]; then
105+ marks="sklearn and production"
106+ else
107+ marks="production"
108+ fi
109+
114110 pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
111+
115112 - name : Run tests on Windows
116113 if : matrix.os == 'windows-latest'
117114 run : | # we need a separate step because of the bash-specific if-statement in the previous one.
118115 pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
116+
119117 - name : Check for files left behind by test
120118 if : matrix.os != 'windows-latest' && always()
121119 run : |
@@ -127,6 +125,7 @@ jobs:
127125 echo "Not all generated files have been deleted!"
128126 exit 1
129127 fi
128+
130129 - name : Upload coverage
131130 if : matrix.code-cov && always()
132131 uses : codecov/codecov-action@v4
@@ -135,3 +134,30 @@ jobs:
135134 token : ${{ secrets.CODECOV_TOKEN }}
136135 fail_ci_if_error : true
137136 verbose : true
137+
138+ dummy_windows_py_sk024 :
139+ name : (windows-latest, Py, sk0.24.*, sk-only:false)
140+ runs-on : ubuntu-latest
141+ steps :
142+ - name : Dummy step
143+ run : |
144+ echo "This is a temporary dummy job."
145+ echo "Always succeeds."
146+
147+ dummy_windows_py_sk023 :
148+ name : (ubuntu-latest, Py3.8, sk0.23.1, sk-only:false)
149+ runs-on : ubuntu-latest
150+ steps :
151+ - name : Dummy step
152+ run : |
153+ echo "This is a temporary dummy job."
154+ echo "Always succeeds."
155+
156+ dummy_docker :
157+ name : docker
158+ runs-on : ubuntu-latest
159+ steps :
160+ - name : Dummy step
161+ run : |
162+ echo "This is a temporary dummy docker job."
163+ echo "Always succeeds."
0 commit comments