-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (29 loc) · 1022 Bytes
/
build_deploy_run.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: Build djakart Docker
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_and_run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: WEBAPP build
run: docker build --build-context webapp_root=./webapp -t enricofer/djakart:latest ./build_webapp
- name: QGIS build
run: docker build -t enricofer/qgis-server:latest ./build_qgis
- name: LIST LOCAL IMAGES
run: docker image ls
- name: DEPLOY
run: docker compose up -d
- name: CHECK HEALTH
run: timeout 240s sh -c 'until docker ps | grep djakart-webapp_djakart | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done'
- name: TEST WEBAPP
run: docker compose exec webapp_djakart /usr/bin/python3 manage.py test djakart.tests --no-input
- name: STOP
run: docker compose down