[WIP] Migrate kissbt to Ruff + Mypy (strict) #33
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: Python package | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f pyproject.toml ]; then | |
| pip install .[dev] | |
| fi | |
| # Ensure ruff and mypy are available | |
| pip install ruff mypy | |
| - name: Lint and format with ruff | |
| run: | | |
| # Check if ruff is available | |
| ruff --version | |
| # Check formatting | |
| ruff format --check . | |
| # Run linting | |
| ruff check . | |
| - name: Type check with mypy | |
| run: | | |
| # Check if mypy is available | |
| mypy --version | |
| mypy kissbt tests | |
| - name: Test with pytest | |
| run: | | |
| pytest |