-
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (53 loc) · 1.46 KB
/
test.yaml
File metadata and controls
59 lines (53 loc) · 1.46 KB
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
name: latest-build
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.13'
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
- name: Test installing development dependencies
working-directory: deployment/docker
run: |
python -m pip install --upgrade pip
pip install -r REQUIREMENTS-dev.txt
- name: Run Flake8 test
run: flake8 .
test:
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v5
- name: Run docker compose services
working-directory: deployment
run: |
echo "Override docker compose for testing purposes"
cp .env.example .env
cp docker-compose.test.yml docker-compose.override.yml
make build-devweb
make devweb
make wait-db
make create-test-db
- name: Run tests
working-directory: deployment
run: |
docker compose exec -T devweb bash -c '
set -e # Exit immediately if any command fails
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py collectstatic --noinput --verbosity 0 &&
python manage.py test
'