38 lines
879 B
YAML
38 lines
879 B
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [ main, 'feature/**', 'release/**' ]
|
|
|
|
jobs:
|
|
test-and-quality:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
pip install pytest pytest-cov ruff black mypy
|
|
|
|
- name: Lint
|
|
run: ruff check .
|
|
|
|
- name: Format check
|
|
run: black --check .
|
|
|
|
- name: Type check
|
|
run: mypy . || true
|
|
|
|
- name: Tests + coverage
|
|
run: |
|
|
pytest --maxfail=1 --disable-warnings --cov=. --cov-report=term-missing --cov-report=xml --cov-fail-under=70
|