Switch to ruff and pyright (#4) #22
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
name: Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
# pyright needs node | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[dev]" | |
- name: Run pyright type check | |
run: | | |
pyright . | |
- name: Run ruff lint | |
run: | | |
ruff check --fix-only . | |
- name: Run ruff format | |
run: | | |
ruff format . | |
- name: Run tests | |
run: | | |
python -m pytest -v --durations=10 |