Repository navigation
Bump version to 1.4.0 #8
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] | |
| pull_request: | |
| # Reused by publish.yml, so a release is built and tested by the same steps | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build distributions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v6 | |
| - name: Check that uv.lock is up to date | |
| run: uv lock --check | |
| - name: Build sdist and wheel | |
| run: uv build | |
| - name: Check metadata | |
| run: uvx twine check --strict dist/* | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| if-no-files-found: error | |
| test: | |
| name: Test (Python ${{ matrix.python }}) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Keep in step with requires-python and the classifiers in pyproject.toml | |
| python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v6 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| # Test the wheel that gets published, installed the way a user installs | |
| # it: from its own metadata, not from the source tree or uv.lock. This | |
| # also catches data files missing from the wheel | |
| - name: Install the wheel | |
| run: | | |
| uv venv --python ${{ matrix.python }} "$RUNNER_TEMP/venv" | |
| uv pip install --python "$RUNNER_TEMP/venv" dist/*.whl pytest | |
| - name: Run tests | |
| run: '"$RUNNER_TEMP/venv/bin/python" -m pytest tests/' |