chore(build): migrate from setuptools to hatchling #186
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
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install uv and Python ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| activate-environment: true | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| requirements-dev.txt | |
| pyproject.toml | |
| - name: Install dependencies | |
| run: | | |
| uv pip install -e . | |
| uv pip install -r requirements-dev.txt | |
| - name: Verify uv.lock is up-to-date | |
| if: matrix.python-version == '3.10' | |
| run: uv lock --check | |
| - name: Check code formatting with pre-commit | |
| if: matrix.python-version == '3.10' | |
| run: pre-commit run --all-files --show-diff-on-failure | |
| - name: Run tests with coverage | |
| if: matrix.python-version == '3.10' | |
| run: pytest tests/ --cov=albucore --cov-report=xml --cov-report=term | |
| - name: Run tests | |
| if: matrix.python-version != '3.10' | |
| run: pytest tests/ | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.python-version == '3.10' | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false |