Typing fixes #126
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, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| # Cancel any in-progress run for the same branch/PR when a newer commit lands. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.5.8" | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install the project | |
| run: uv sync --all-extras | |
| - name: Check imports with isort | |
| run: uv run isort --check-only --diff . | |
| - name: Check code formatting with black | |
| run: uv run black --check . | |
| - name: Type-check with pyright | |
| run: uvx pyright --pythonpath .venv/bin/python api tests | |
| # The suite needs no database: migrations are skipped under pytest and the | |
| # DB session is mocked at the data-fetcher boundary (see CLAUDE.md). | |
| - name: Run tests | |
| run: uv run pytest tests |