Provide mypy typehints also for docs as a very clean solution #2
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: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| pyproject.toml | |
| **/requirements*.txt | |
| - name: Install project (dev + test extras) | |
| run: | | |
| python -m pip install -U pip | |
| pip install -e .[dev,test] | |
| # ---- Lint & type-check ---- | |
| - name: Ruff (lint) | |
| run: ruff check . | |
| - name: Ruff (format check) | |
| run: ruff format --check . | |
| - name: mypy | |
| run: mypy . | |
| # ---- Tests ---- | |
| - name: Run tests | |
| run: pytest -q |