Bump python version #106
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A GitHub Actions workflow file to run on pull request and on main. | |
| name: CI Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| # ---------------------------------------------------------------------------------------------- | |
| # Code Quality Checks and Linting | |
| # ---------------------------------------------------------------------------------------------- | |
| check_code_quality: | |
| name: Code Quality Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Install pre-commit | |
| run: | | |
| uv sync --group lint | |
| uv run pre-commit install | |
| - name: Run code-quality checks | |
| run: uv run pre-commit run --all-files --show-diff-on-failure | |
| # ---------------------------------------------------------------------------------------------- | |
| # Install and Import Check `shapiq` | |
| # ---------------------------------------------------------------------------------------------- | |
| install_and_import_shapiq: | |
| name: Install and import check shapiq | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.12" | |
| - os: ubuntu-latest | |
| python-version: "3.14" | |
| - os: windows-latest | |
| python-version: "3.12" | |
| - os: macos-latest | |
| python-version: "3.12" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Create uv virtual environment | |
| run: uv venv | |
| - name: Install shapiq package | |
| run: uv run --no-sync uv pip install . | |
| - name: Test import | |
| run: uv run --no-sync python -c "import shapiq; print('shapiq imported successfully')" | |
| # ---------------------------------------------------------------------------------------------- | |
| # Install and Import Check `shapiq_games` | |
| # ---------------------------------------------------------------------------------------------- | |
| install_and_import_shapiq_games: | |
| name: Install and import check shapiq-games | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Create uv virtual environment | |
| run: uv venv | |
| - name: Install shapiq package | |
| run: uv run --no-sync uv pip install . | |
| - name: Install dependencies | |
| run: uv sync --no-dev --group all_ml | |
| - name: Test import of shapiq_games | |
| run: uv run --no-sync python -c "import shapiq_games; print('shapiq_games imported successfully')" | |
| # ---------------------------------------------------------------------------------------------- | |
| # Unit Tests for shapiq (Stable Python and Matrix) | |
| # ---------------------------------------------------------------------------------------------- | |
| test_shapiq_stable: | |
| name: Run Unit Tests (Stable Python) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Install test dependencies | |
| run: uv sync | |
| - name: Run unit tests | |
| run: uv run pytest "tests/shapiq" | |
| test_shapiq_matrix: | |
| name: Run Unit Tests (Matrix) | |
| needs: | |
| - test_shapiq_stable | |
| - install_and_import_shapiq | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.14" # Test latest Python on Ubuntu | |
| - os: windows-latest | |
| python-version: "3.12" # Test stable Python on Windows | |
| - os: macos-latest | |
| python-version: "3.12" # Test stable Python on macOS | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Install test dependencies | |
| run: uv sync | |
| - name: Run unit tests | |
| run: uv run pytest "tests/shapiq" | |
| # ---------------------------------------------------------------------------------------------- | |
| # Unit Tests for shapiq-games | |
| # ---------------------------------------------------------------------------------------------- | |
| test_shapiq_games: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - install_and_import_shapiq | |
| - test_shapiq_stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run tests | |
| run: uv run pytest "tests/shapiq_games" -n logical | |
| # ---------------------------------------------------------------------------------------------- | |
| # Test Documentation Build | |
| # ---------------------------------------------------------------------------------------------- | |
| doc_build: | |
| name: Test Documentation Build | |
| runs-on: ubuntu-latest | |
| needs: | |
| - install_and_import_shapiq | |
| - check_code_quality | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Install pandoc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| - name: Install dependencies | |
| run: uv sync --no-dev --group docs | |
| - name: Build documentation | |
| run: uv run --no-sync sphinx-build --keep-going -b html docs/source docs/build/html | |
| # ---------------------------------------------------------------------------------------------- | |
| # Code Coverage | |
| # ---------------------------------------------------------------------------------------------- | |
| run_coverage: | |
| name: Run Test Coverage | |
| runs-on: ubuntu-latest | |
| needs: | |
| - install_and_import_shapiq | |
| - check_code_quality | |
| - test_shapiq_stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python and uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Install test dependencies | |
| run: uv sync | |
| - name: Measure coverage | |
| run: uv run pytest "tests/shapiq" --cov=shapiq --cov-report=xml -n logical | |
| - name: Upload coverage to codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true |