1+ ---
12name : Tests
23
34on :
@@ -21,117 +22,125 @@ 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 }}
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- os : [ubuntu-latest]
31- sklearn-only : ["true"]
3230 include :
3331 - 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
32+ python-version : " 3.10"
33+ scikit-learn : " 1.0.*"
34+ scipy : " 1.10.0"
35+ sklearn-only : true
3936 - os : ubuntu-latest
40- python-version : " 3.9 "
41- scikit-learn : " 0.24 "
37+ python-version : " 3.11 "
38+ scikit-learn : " 1.3.* "
4239 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
40+ sklearn-only : true
41+ - os : ubuntu-latest
42+ python-version : " 3.12"
43+ scikit-learn : " 1.5.*"
44+ scipy : " >=1.11"
45+ sklearn-only : true
46+ - os : ubuntu-latest
47+ python-version : " 3.13"
48+ scikit-learn : " 1.6.*"
49+ scipy : " >=1.10"
50+ sklearn-only : true
51+ - os : ubuntu-latest
52+ python-version : " 3.14"
53+ scikit-learn : " 1.7.*"
54+ scipy : " >=1.10"
55+ sklearn-only : true
4656 - 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
57+ python-version : " 3.10"
58+ scikit-learn : " 1.5.*"
59+ scipy : " 1.10.1"
60+ sklearn-only : false
61+ - os : windows-latest
62+ python-version : " 3.13"
63+ scikit-learn : " 1.6.*"
64+ scipy : " >=1.10"
65+ sklearn-only : false
5266 - os : ubuntu-latest
53- code-cov : true
54- python-version : " 3.8"
55- scikit-learn : 0.23.1
56- sklearn-only : ' false'
57- fail-fast : false
58-
67+ code-cov : false
68+ python-version : " 3.10"
69+ scikit-learn : " 1.5.*"
70+ scipy : " >=1.10"
71+ sklearn-only : false
5972 steps :
60- - uses : actions/checkout@v4
61- with :
62- fetch-depth : 2
63- - name : Setup Python ${{ matrix.python-version }}
64- if : matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.9.13)
65- uses : actions/setup-python@v5
66- with :
67- python-version : ${{ matrix.python-version }}
68- - name : Install test dependencies
69- run : |
70- 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 }}
90- - name : Store repository status
91- id : status-before
92- if : matrix.os != 'windows-latest'
93- run : |
94- git_status=$(git status --porcelain -b)
95- echo "BEFORE=$git_status" >> $GITHUB_ENV
96- echo "Repository status before tests: $git_status"
97- - name : Show installed dependencies
98- run : python -m pip list
99- - name : Run tests on Ubuntu Test
100- if : matrix.os == 'ubuntu-latest'
101- 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"
106- pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
107- - name : Run tests on Ubuntu Production
108- if : matrix.os == 'ubuntu-latest'
109- 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"
114- pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
115- - name : Run tests on Windows
116- if : matrix.os == 'windows-latest'
117- run : | # we need a separate step because of the bash-specific if-statement in the previous one.
118- pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
119- - name : Check for files left behind by test
120- if : matrix.os != 'windows-latest' && always()
121- run : |
122- before="${{ env.BEFORE }}"
123- after="$(git status --porcelain -b)"
124- if [[ "$before" != "$after" ]]; then
73+ - uses : actions/checkout@v4
74+ with :
75+ fetch-depth : 2
76+ - name : Setup Python ${{ matrix.python-version }}
77+ uses : actions/setup-python@v5
78+ with :
79+ python-version : ${{ matrix.python-version }}
80+ allow-prereleases : true
81+ - name : Install test dependencies
82+ run : |
83+ python -m pip install --upgrade pip
84+ pip install -e .[test]
85+ - name : Install scikit-learn ${{ matrix.scikit-learn }}
86+ run : |
87+ pip install scikit-learn==${{ matrix.scikit-learn }}
88+ - name : " Install NumPy 1.x and SciPy <1.11 for scikit-learn < 1.4"
89+ if : ${{ contains(fromJSON('["1.0.*", "1.1.*", "1.2.*", "1.3.*"]'), matrix.scikit-learn) }}
90+ shell : bash
91+ run : |
92+ # scipy has a change to the 'mode' behavior which breaks scikit-learn < 1.4
93+ # numpy 2.0 has several breaking changes
94+ pip install "numpy<2.0" "scipy<1.11"
95+ - name : Install scipy ${{ matrix.scipy }}
96+ if : ${{ matrix.scipy }}
97+ run : |
98+ pip install scipy${{ matrix.scipy }}
99+ - name : Store repository status
100+ id : status-before
101+ if : matrix.os != 'windows-latest'
102+ run : |
103+ git_status=$(git status --porcelain -b)
104+ echo "BEFORE=$git_status" >> $GITHUB_ENV
105+ echo "Repository status before tests: $git_status"
106+ - name : Show installed dependencies
107+ run : python -m pip list
108+ - name : Run tests on Ubuntu Test
109+ if : matrix.os == 'ubuntu-latest'
110+ run : |
111+ if [ "${{ matrix.code-cov }}" = "true" ]; then codecov='--cov=openml --long --cov-report=xml'; fi
112+ # Most of the time, running only the scikit-learn tests is sufficient
113+ if [ "${{ matrix.sklearn-only }}" = "true" ]; then marks='sklearn and not production'; else marks='not production'; fi
114+ echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
115+ pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
116+ - name : Run tests on Ubuntu Production
117+ if : matrix.os == 'ubuntu-latest'
118+ run : |
119+ if [ "${{ matrix.code-cov }}" = "true" ]; then codecov='--cov=openml --long --cov-report=xml'; fi
120+ # Most of the time, running only the scikit-learn tests is sufficient
121+ if [ "${{ matrix.sklearn-only }}" = "true" ]; then marks='sklearn and production'; else marks='production'; fi
122+ echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
123+ pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
124+ - name : Run tests on Windows
125+ if : matrix.os == 'windows-latest'
126+ run : |
127+ pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
128+ - name : Check for files left behind by test
129+ if : matrix.os != 'windows-latest' && always()
130+ run : |
131+ before="${{ env.BEFORE }}"
132+ after="$(git status --porcelain -b)"
133+ if [[ "$before" != "$after" ]]; then
125134 echo "git status from before: $before"
126135 echo "git status from after: $after"
127136 echo "Not all generated files have been deleted!"
128137 exit 1
129- fi
130- - name : Upload coverage
131- if : matrix.code-cov && always()
132- uses : codecov/codecov-action@v4
133- with :
134- files : coverage.xml
135- token : ${{ secrets.CODECOV_TOKEN }}
136- fail_ci_if_error : true
137- verbose : true
138+ fi
139+ - name : Upload coverage
140+ if : matrix.code-cov && always()
141+ uses : codecov/codecov-action@v4
142+ with :
143+ files : coverage.xml
144+ token : ${{ secrets.CODECOV_TOKEN }}
145+ fail_ci_if_error : true
146+ verbose : true
0 commit comments