Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CI: add sklearn versions to matrix
  • Loading branch information
MuellerSeb committed Oct 16, 2025
commit 9f3a35b5bf46af15938531f577d54ada4cb1b27e
44 changes: 12 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,37 +70,29 @@ jobs:
build_sdist:
name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }}
runs-on: ${{ matrix.os }}
env:
SCIKIT_LEARN_DATA: ${{ github.workspace }}/.cache/scikit_learn_data
strategy:
fail-fast: false
matrix:
os:
[ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14]
ver:
- { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
- { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
- { py: "3.11", np: "==1.23.2", sp: "==1.9.2" }
- { py: "3.12", np: "==1.26.2", sp: "==1.11.2" }
- { py: "3.13", np: "==2.1.0", sp: "==1.14.1" }
- { py: "3.14", np: "==2.3.2", sp: "==1.16.1" }
- { py: "3.14", np: ">=2.3.2", sp: ">=1.16.1" }
- { py: "3.9", np: "==1.20.0", sp: "==1.5.4", sk: "==0.24.0" }
- { py: "3.10", np: "==1.21.6", sp: "==1.7.2", sk: "==1.0.2" }
- { py: "3.11", np: "==1.23.2", sp: "==1.9.2", sk: "==1.1.3" }
- { py: "3.12", np: "==1.26.2", sp: "==1.11.2", sk: "==1.3.1" }
- { py: "3.13", np: "==2.1.0", sp: "==1.14.1", sk: "==1.5.2" }
- { py: "3.14", np: "==2.3.2", sp: "==1.16.1", sk: "==1.7.2" }
- { py: "3.14", np: ">=2.3.2", sp: ">=1.16.1", sk: ">=1.7.2" }
exclude:
- os: macos-14
ver: { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
ver: { py: "3.9", np: "==1.20.0", sp: "==1.5.4", sk: "==0.24.0" }
- os: macos-14
ver: { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
ver: { py: "3.10", np: "==1.21.6", sp: "==1.7.2", sk: "==1.0.2" }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Cache scikit-learn dataset
uses: actions/cache@v4
with:
path: .cache/scikit_learn_data
key: ${{ runner.os }}-sklearn-data

- name: Set up Python ${{ matrix.ver.py }}
uses: actions/setup-python@v5
with:
Expand All @@ -115,12 +107,12 @@ jobs:
run: |
pip install -v --editable .[test]

- name: Pre-fetch scikit-learn datasets
run: python -c "from sklearn.datasets import fetch_california_housing; fetch_california_housing()"
- name: Install pinned dependencies
run: |
pip install "numpy${{ matrix.ver.np }}" "scipy${{ matrix.ver.sp }}" "scikit-learn${{ matrix.ver.sk }}"

- name: Run tests
run: |
pip install "numpy${{ matrix.ver.np }}" "scipy${{ matrix.ver.sp }}"
python -m pytest -v tests/

- name: Build sdist
Expand All @@ -137,20 +129,11 @@ jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
env:
SCIKIT_LEARN_DATA: ${{ github.workspace }}/.cache/scikit_learn_data

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Cache scikit-learn dataset
uses: actions/cache@v4
with:
path: .cache/scikit_learn_data
key: ${{ runner.os }}-sklearn-data

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
Expand All @@ -165,9 +148,6 @@ jobs:
run: |
pip install -v --editable .[test]

- name: Pre-fetch scikit-learn datasets
run: python -c "from sklearn.datasets import fetch_california_housing; fetch_california_housing()"

- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down