36 lines
946 B
YAML
36 lines
946 B
YAML
name: quality-gates
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out source
|
|
uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: pip
|
|
- name: Install project and pinned quality tools
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
python -m pip install --upgrade pip
|
|
if [[ -f requirements.txt ]]; then python -m pip install -r requirements.txt; fi
|
|
if [[ -f requirements-dev.txt ]]; then python -m pip install -r requirements-dev.txt; fi
|
|
python -m pip install ruff==0.6.9 mypy==1.11.2 pytest==8.3.3
|
|
- name: Lint
|
|
run: python -m ruff check .
|
|
- name: Type check
|
|
run: python -m mypy app
|
|
- name: Test
|
|
run: python -m pytest -q
|