feat: adopt pyright and add CI (ruff + format + pyright + pytest) #4
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| quality: | |
| name: lint · types · tests (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| env: | |
| UV_PYTHON: ${{ matrix.python-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| - name: Install Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Lint (ruff check) | |
| run: uv run ruff check src tests | |
| - name: Format check (ruff format) | |
| run: uv run ruff format --check src tests | |
| - name: Type check (pyright) | |
| run: uv run pyright | |
| - name: Tests (pytest) | |
| run: uv run pytest -q |