Update pytest requirement from <9.0.0,>=8.0.0 to >=8.0.0,<10.0.0 #16
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 | |
| tags: | |
| - '*' | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| linter: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code Repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| # Consider using pre-commit.ci for open source project | |
| - name: Run pre-commit | |
| uses: pre-commit/[email protected] | |
| # With no caching at all the entire ci process takes 3m to complete! | |
| pytest: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code Repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install Dependencies | |
| run: uv sync --frozen --all-extras --dev | |
| - name: Test with pytest | |
| run: | | |
| uv run python --version | |
| uv run pytest | |
| publish-release: | |
| needs: [linter, pytest] | |
| name: Release | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true # This one should `fail-fast` | |
| environment: pypi | |
| if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| # Use to sign the release artifacts | |
| id-token: write | |
| # Used to upload release artifacts | |
| contents: write | |
| # Used to generate artifact attestation | |
| attestations: write | |
| steps: | |
| - name: Checkout Code Repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: 3.14 | |
| - name: Install Dependencies | |
| run: uv sync --all-extras --frozen --dev | |
| - name: Build the wheel artifact | |
| run: | | |
| uv build | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: dist | |
| if-no-files-found: error | |
| - name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@v3 | |
| with: | |
| subject-path: 'dist/*' | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| print-hash: true | |
| skip-existing: true | |
| verbose: true | |
| packages-dir: 'dist' |