-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 1.67 KB
/
compose-test_tang.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
name: "Docker Compose Test (Tang)"
on:
pull_request:
branches: master
push:
branches: master
schedule:
- cron: "0 8 * * *"
env:
TARGET_SERVICE: tang
TARGET_TIMEOUT: 45
jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: "Git: Checkout"
uses: actions/checkout@v4
-
name: "Service: Setup"
run: |
cp .github/workflows/config/meta.override.yml "${TARGET_SERVICE}/"
cp .github/workflows/config/meta.override.yml "traefik/"
-
name: "Service: Start"
run: |
./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
cd ${TARGET_SERVICE} ; cat .env
sleep ${TARGET_TIMEOUT}s
-
name: "Service: Test"
run: |
if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
exit 1
fi
-
name: "Service: Restart with Traefik"
run: |
./comp down,up ${TARGET_SERVICE}
-
name: "Service: Wait"
run: |
sleep ${TARGET_TIMEOUT}s ; sleep ${TARGET_TIMEOUT}s
-
name: "Service: Test with Traefik"
run: |
if ! ./comp status ${TARGET_SERVICE} ; then
docker ps
cd ${TARGET_SERVICE} ; docker compose logs
cd traefik ; docker compose logs
exit 1
fi
cd traefik
docker compose exec -T traefik wget --spider http://localhost:9080/tang/adv \
|| (docker ps ; docker compose logs ; cd ../${TARGET_SERVICE} ; docker compose logs ; exit 1)