mirror of
https://github.com/vee1e/bulk-questionnaire-upload.git
synced 2026-09-01 09:50:06 +00:00
43 lines
987 B
YAML
43 lines
987 B
YAML
name: Backend CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- 'backend/**'
|
|
- 'tests/backend/**'
|
|
- 'ruff.toml'
|
|
- 'pytest.ini'
|
|
- '.github/workflows/backend.yml'
|
|
pull_request:
|
|
branches: [ main ]
|
|
paths:
|
|
- 'backend/**'
|
|
- 'tests/backend/**'
|
|
- 'ruff.toml'
|
|
- 'pytest.ini'
|
|
- '.github/workflows/backend.yml'
|
|
|
|
jobs:
|
|
backend-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install ruff pytest-cov
|
|
pip install -r backend/requirements.txt
|
|
|
|
- name: Lint with ruff
|
|
run: ruff check backend/ tests/backend/
|
|
|
|
- name: Run pytest
|
|
run: python -m pytest tests/backend -q --cov=backend --cov-report=term-missing
|