@@ -23,74 +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.11 "]
29- scikit-learn : ["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"]
32- fail-fast : false
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+
42+ include :
43+ # Full test run on Windows
44+ - os : windows-latest
45+ python-version : " 3.12"
46+ scikit-learn : " 1.5.*"
47+ sklearn-only : " false"
48+
49+ # Coverage run
50+ - os : ubuntu-latest
51+ python-version : " 3.12"
52+ scikit-learn : " 1.5.*"
53+ sklearn-only : " false"
54+ code-cov : true
3355
3456 steps :
3557 - uses : actions/checkout@v6
3658 with :
3759 fetch-depth : 2
60+
3861 - name : Setup Python ${{ matrix.python-version }}
39- if : matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.9.13)
4062 uses : actions/setup-python@v5
4163 with :
4264 python-version : ${{ matrix.python-version }}
43- - name : Install test dependencies
65+
66+ - name : Install test dependencies and scikit-learn
4467 run : |
4568 python -m pip install --upgrade pip
46- pip install -e .[test]
47- - name : Install scikit-learn ${{ matrix.scikit-learn }}
48- run : |
49- pip install scikit-learn==${{ matrix.scikit-learn }}
50- - name : Install numpy for Python 3.8
51- # Python 3.8 & scikit-learn<0.24 requires numpy<=1.23.5
52- if : ${{ matrix.python-version == '3.8' && matrix.scikit-learn == '0.23.1' }}
53- run : |
54- pip install numpy==1.23.5
55- - name : " Install NumPy 1.x and SciPy <1.11 for scikit-learn < 1.4"
56- if : ${{ contains(fromJSON('["1.0.*", "1.1.*", "1.2.*", "1.3.*"]'), matrix.scikit-learn) }}
57- run : |
58- # scipy has a change to the 'mode' behavior which breaks scikit-learn < 1.4
59- # numpy 2.0 has several breaking changes
60- pip install "numpy<2.0" "scipy<1.11"
61- - name : Install scipy ${{ matrix.scipy }}
62- if : ${{ matrix.scipy }}
63- run : |
64- pip install scipy==${{ matrix.scipy }}
69+ pip install -e .[test] scikit-learn==${{ matrix.scikit-learn }}
70+
6571 - name : Store repository status
6672 id : status-before
6773 if : matrix.os != 'windows-latest'
6874 run : |
6975 git_status=$(git status --porcelain -b)
7076 echo "BEFORE=$git_status" >> $GITHUB_ENV
7177 echo "Repository status before tests: $git_status"
78+
7279 - name : Show installed dependencies
7380 run : python -m pip list
81+
7482 - name : Run tests on Ubuntu Test
7583 if : matrix.os == 'ubuntu-latest'
7684 run : |
77- if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
78- # Most of the time, running only the scikit-learn tests is sufficient
79- if [ ${{ matrix.sklearn-only }} = 'true' ]; then marks='sklearn and not production'; else marks='not production'; fi
80- 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+
8195 pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
96+
8297 - name : Run tests on Ubuntu Production
8398 if : matrix.os == 'ubuntu-latest'
8499 run : |
85- if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
86- # Most of the time, running only the scikit-learn tests is sufficient
87- if [ ${{ matrix.sklearn-only }} = 'true' ]; then marks='sklearn and production'; else marks='production'; fi
88- 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+
89110 pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
111+
90112 - name : Run tests on Windows
91113 if : matrix.os == 'windows-latest'
92114 run : | # we need a separate step because of the bash-specific if-statement in the previous one.
93115 pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
116+
94117 - name : Check for files left behind by test
95118 if : matrix.os != 'windows-latest' && always()
96119 run : |
@@ -102,6 +125,7 @@ jobs:
102125 echo "Not all generated files have been deleted!"
103126 exit 1
104127 fi
128+
105129 - name : Upload coverage
106130 if : matrix.code-cov && always()
107131 uses : codecov/codecov-action@v4
0 commit comments