-
Notifications
You must be signed in to change notification settings - Fork 123
36 lines (30 loc) · 1.15 KB
/
docker-compose-up-test.yaml
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
name: Docker Compose Up Test
on:
push:
branches:
- master
pull_request:
jobs:
docker-compose-test:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Run Docker Compose
run: docker compose up -d
- name: Sleep
run: sleep 60
- name: Check services running
run: |
if docker compose ps -a --filter="status=exited" --services | grep -v anvil-advance-chain-script | xargs grep -q; then
echo "Some services are not running"
exit 1
fi
# TODO: we should also add https://docs.docker.com/reference/dockerfile/#healthcheck to the aggregator and operator docker images
# then we could check on their health status (maybe the processes are still running, but they are logging a lot of errors and we want to catch that)
# - name: Check services health
# run: |
# if docker-compose -f docker-compose.yml ps -q | xargs docker inspect -f '{{ .State.Health.Status }}' | grep -v healthy; then
# echo "Some services are not healthy"
# exit 1
# fi