Skip to content

Commit

Permalink
WIP - to squash
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Dec 13, 2024
1 parent 03083a4 commit 39009b6
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions .github/workflows/skore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,67 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # , "windows-latest"]
python: ["3.12"] # "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "windows-latest"]
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"
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/cache@v4
id: cache-python-venv
with:
path: 'skore/venv'
key: python-venv-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.scikit-learn }}-${{ hashFiles('skore/pyproject.toml') }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: "pip"
- name:
timeout-minutes: 10

- name: Setup python-venv
working-directory: "skore/"
run: |
set -eu
# Initialize python-venv
# Ensure venv is created
python -m venv venv
# Activate venv for each step depending on the OS
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
source venv/bin/activate
echo PATH="${PWD}/venv/bin:${PATH}" >> ${GITHUB_ENV}
else
venv/Scripts/activate
echo PATH="${PWD}/venv/Scripts:${PATH}" >> ${GITHUB_ENV}
fi
# Install dependencies
- name: Install dependencies
working-directory: "skore/"
if: steps.cache-python-venv-restore.outputs.cache-hit != 'true'
run: |
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 }}"
python -m pip install --upgrade ".[test]"
- name:
timeout-minutes: 10
working-directory: "skore/"
run: |
# Lint
pre-commit run --all-files ruff
# Build
python -m build
# Install
wheel=(dist/*.whl); python -m pip install --upgrade "${wheel}[test]"
wheel=(dist/*.whl); python -m pip install --force-reinstall --no-deps "${wheel}"
# Test
python -m pytest --no-cov src/ tests/

0 comments on commit 39009b6

Please sign in to comment.