Skip to content

Commit

Permalink
ci: Test with the 4 latest major versions of scikit-learn
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Dec 11, 2024
1 parent 46d4f75 commit 11f3c35
Showing 1 changed file with 43 additions and 29 deletions.
72 changes: 43 additions & 29 deletions .github/workflows/skore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,35 @@ jobs:
fail-fast: true
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12"]
scikit-learn: ["1.6"]
include:
- os: "ubuntu-latest"
python: "3.12"
scikit-learn: "1.3"
- os: "ubuntu-latest"
python: "3.12"
scikit-learn: "1.4"
- os: "ubuntu-latest"
python: "3.12"
scikit-learn: "1.5"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}
cache: "pip"
- name:
timeout-minutes: 10
run: |
set -u
# Install dependencies
python -m pip install --upgrade pip
python -m pip install --upgrade pre-commit
python -m pip install --upgrade build
python -m pip install --upgrade "pip"
python -m pip install --upgrade "pre-commit"
python -m pip install --upgrade "build"
python -m pip install --upgrade "scikit-learn ==${{ matrix.scikit-learn }}"
# Lint
pre-commit run --all-files ruff
Expand All @@ -41,28 +55,28 @@ jobs:
# Test
python -m pytest --no-cov src/ tests/
coverage-skore:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "pip"
- name: pytest coverage
run: |
# Install dependencies
python -m pip install --upgrade pip
python -m pip install --upgrade pre-commit
python -m pip install --upgrade build
python -m pip install -e .[test]
# coverage-skore:
# runs-on: ubuntu-latest
# if: ${{ github.event_name == 'pull_request' }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.12
# cache: "pip"
# - name: pytest coverage
# run: |
# # Install dependencies
# python -m pip install --upgrade pip
# python -m pip install --upgrade pre-commit
# python -m pip install --upgrade build
# python -m pip install -e .[test]

# run coverage
python -m pytest --junitxml=coverage.xml --cov=skore src/ tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./skore/pytest-coverage.txt
junitxml-path: ./skore/coverage.xml
title: pytest coverage report
# # run coverage
# python -m pytest --junitxml=coverage.xml --cov=skore src/ tests/ | tee pytest-coverage.txt
# - name: Pytest coverage comment
# uses: MishaKav/pytest-coverage-comment@main
# with:
# pytest-coverage-path: ./skore/pytest-coverage.txt
# junitxml-path: ./skore/coverage.xml
# title: pytest coverage report

0 comments on commit 11f3c35

Please sign in to comment.