mypy passes for private stuff now too, may make it a full-fledged CI … #287
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: Type Coverage and Linting | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.12', '3.13' ] | |
| name: "Type Coverage and Linting @ ${{ matrix.python-version }}" | |
| steps: | |
| - name: "Checkout Repository" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup PDM @ ${{ matrix.python-version }} | |
| uses: pdm-project/setup-pdm@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: true | |
| allow-python-prereleases: true | |
| - name: Install deps @ ${{ matrix.python-version }} | |
| run: | | |
| pdm install --check --no-editable | |
| - name: Activate venv @ ${{ matrix.python-version }} | |
| run: | | |
| echo "$(pdm info --where)/.venv/bin" >> $GITHUB_PATH | |
| - name: "Run Pyright @ ${{ matrix.python-version }}" | |
| uses: jakebailey/pyright-action@v2 | |
| with: | |
| warnings: false | |
| - name: Lint check | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: check . | |
| version: latest | |
| - name: Formatting check | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: format --check | |
| version: latest | |
| - name: Verify No CLRF line endings. | |
| run: > | |
| ! $(find . ! -path "./.git/*" -not -type d -exec file "{}" ";" |& grep -q " CRLF ") | |
| - name: Ensure runtime validity of annotations | |
| run: python _misc/_ensure_annotations.py |