37 lines
714 B
YAML
37 lines
714 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
container: python:3.11-slim
|
|
defaults:
|
|
run:
|
|
working-directory: ./backend
|
|
|
|
steps:
|
|
- name: Install git
|
|
run: apt-get update && apt-get install -y git
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install -r requirements-dev.txt
|
|
|
|
- name: Lint with ruff
|
|
run: ruff check .
|
|
|
|
- name: Format check with ruff
|
|
run: ruff format --check .
|
|
|
|
- name: Run tests
|
|
run: pytest -q
|