-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (38 loc) · 1.24 KB
/
main.workflow.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
name: 'Install, lint, test & build'
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Linting
run: bash cleanup.sh
- name: Create Docker Looplijsten Backend network
run: docker network create top_network
- name: Create Docker Top and Zaak Backend Bridge network
run: docker network create top_and_zaak_backend_bridge
- name: Build Docker image
run: docker compose -f docker-compose.local.yml up -d
- run: sleep 30
- name: Run Tests
run: docker compose -f docker-compose.local.yml exec -T api python manage.py test
###################################################
# On failure
###################################################
- if: ${{ failure() }}
name: "ON FAILURE: Which containers were running while failing?"
run: docker ps -a
- if: ${{ failure() }}
name: "ON FAILURE: Backend logs"
run: docker logs top-backend-api-1
- if: ${{ failure() }}
name: "ON FAILURE: Celery worker logs"
run: docker logs top_celery_worker