Quart2 #18
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: Python checks | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- backend/** | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: ["main"] | |
jobs: | |
ruff: | |
name: Ruff check and linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
cd ./backend | |
python -m pip install --upgrade pip | |
pip install ruff | |
pip install .[typed] | |
- name: Check style with Ruff | |
run: | | |
cd ./backend | |
ruff check --output-format=github . | |
- name: Check type hints with mypy | |
run: | | |
cd ./backend | |
mypy --show-error-codes --check-untyped-defs --config-file ./pyproject.toml ./beets_flask | |
- name: Test with pytest | |
run: | | |
cd ./backend | |
pip install .[test] | |
coverage run -m pytest -v -s |