Skip to content

[WIP] Migrate kissbt to Ruff + Mypy (strict) #34

[WIP] Migrate kissbt to Ruff + Mypy (strict)

[WIP] Migrate kissbt to Ruff + Mypy (strict) #34

Workflow file for this run

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