38 lines
817 B
YAML
38 lines
817 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./backend
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
run: |
|
|
apt-get update && apt-get install -y python3 python3-pip python3-venv || true
|
|
python3 --version
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python3 -m pip install --upgrade pip
|
|
python3 -m pip install -r requirements.txt
|
|
python3 -m pip install -r requirements-dev.txt
|
|
|
|
- name: Lint with ruff
|
|
run: python3 -m ruff check .
|
|
|
|
- name: Format check with ruff
|
|
run: python3 -m ruff format --check .
|
|
|
|
- name: Run tests
|
|
run: python3 -m pytest -q
|