Use mypy for type checking #68
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: Test python package | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run Ruff | |
| run: uvx ruff check . --output-format=github | |
| - name: Run type checks | |
| run: mypy pystiebeleltron --show-error-codes --pretty | |
| - name: Run tests | |
| run: | | |
| uv run pytest \ | |
| -qq \ | |
| --durations=10 \ | |
| -o console_output_style=count \ | |
| -p no:sugar \ | |
| test |