-
-
Notifications
You must be signed in to change notification settings - Fork 94
73 lines (57 loc) · 1.87 KB
/
django-app-coverage.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Remember to also update the Docker Compose configuration, as appropriate:
# cc-legal-tools-app/docker-compose.yml
name: Django App Coverage
on:
pull_request:
push:
branches: [main]
jobs:
job:
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: cc_legal_tools.settings.dev
PYTHONDONTWRITEBYTECODE: 1
PYTHONFAULTHANDLER: 1
steps:
- name: Configure testing git identity
run: |
git config --global user.email "testing_user@localhost"
git config --global user.name "Testing User"
# https://github.com/actions/setup-python
- name: Install Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pipenv
run: |
pip install --upgrade pip
pip install pipenv
# https://github.com/actions/checkout
- name: Checkout cc-legal-tools-app
uses: actions/checkout@v4
with:
path: cc-legal-tools-app
# https://github.com/actions/checkout
- name: Checkout cc-legal-tools-data
uses: actions/checkout@v4
with:
repository: creativecommons/cc-legal-tools-data
path: cc-legal-tools-data
- name: Install Python dependencies
run: pipenv sync --dev --system
working-directory: ./cc-legal-tools-app
- name: Check for missing Django migrations
run: ./manage.py makemigrations --check
working-directory: ./cc-legal-tools-app
- name: Update Django database schema
run: ./manage.py migrate
working-directory: ./cc-legal-tools-app
- name: Coverage Test
run: coverage run manage.py test --noinput --parallel 4
working-directory: ./cc-legal-tools-app
- name: Coverage Combine
run: coverage combine
working-directory: ./cc-legal-tools-app
- name: Coverage Report
run: coverage report
working-directory: ./cc-legal-tools-app