-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (34 loc) · 977 Bytes
/
backend.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: Backend CI
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the prod image
working-directory: ./backend
run: |
docker build .
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint the code
run: |
echo "UID=$UID" > .env
docker compose run --rm backend ruff format --check
docker compose run --rm backend ruff check . --output-format=github
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set ENV vars
run: echo "UID=$UID" > .env
- name: Check for missing migrations
run: docker compose run --rm backend python manage.py makemigrations --check --dry-run --no-input
- name: Run pytest
run: docker compose run --rm backend pytest --no-cov-on-fail --cov --create-db -vv