Use ruff for linting and formatting #76
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
workflow_dispatch: # to allow manual re-runs | |
jobs: | |
linting: | |
name: "Perform linting checks" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "Install dependencies" | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry install | |
- name: "Linting and code formating (ruff)" | |
run: | | |
poetry run pre-commit run ruff --all-files | |
- name: "Typing checks (mypy)" | |
run: | | |
poetry run pre-commit run mypy --all-files |