-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.22 KB
/
tests.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: tests
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
env:
PYTHON_VERSION: 3.11.9
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- name: Set up Python and uv
uses: drivendataorg/setup-python-uv-action@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: packages
cache-dependency-path: >-
requirements.txt
dev-requirements.txt
- name: Install dependencies
run: |
uv pip install -r dev-requirements.txt
- name: Lint project
run: |
just lint
- name: Check for unmade migrations
run: |
python manage.py makemigrations --check --dry-run
- name: Migrate
run: |
python manage.py migrate --noinput
- name: Run tests
run: |
coverage run manage.py test
coverage report -m