ci: gate publish on lint, tests, and build #1
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: | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v9 | |
| with: | |
| enable-cache: true | |
| - name: Lint | |
| run: uv run --extra dev ruff check . | |
| - name: Format | |
| run: uv run --extra dev ruff format --check . | |
| # Browser and live tests need downloaded browsers and third-party | |
| # services; the deselected suite is the deterministic contract. | |
| - name: Test | |
| run: uv run --extra dev pytest -q -m "not browser and not live" | |
| - name: Build | |
| run: uv run --with build python -m build |