-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.05 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
name: 'Install, lint, test & build'
on:
push:
branches: [ main ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install setuptools
run: python3 -m pip install setuptools
- name: Linting
run: bash bin/cleanup_pre_commit.sh
- name: Build Docker image
run: docker compose -f docker-compose.local.yml build
- name: Create Docker network
run: docker network create zwd_network
- name: Start images
run: docker compose -f docker-compose.local.yml -f docker-compose.override.yml up -d
- name: Run Tests
run: docker compose exec -T zwd-backend python manage.py test /app/apps
- 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 zwd-backend-zwd-backend-1