-
Notifications
You must be signed in to change notification settings - Fork 36
30 lines (29 loc) · 956 Bytes
/
docker.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
name: Docker
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3.0.0
- name: Start containers
run: docker-compose up --build --force-recreate --detach
- name: Verify all tests completed successfully
run: |
set -x
for testname in test-curl-nossl test-curl-ssl test-utils-nossl test-utils-ssl; do
name=$(docker-compose ps | grep ${testname} | awk '{print $1}')
rc=$(docker wait "${name}")
if [ "${rc}" != "0" ]; then
echo "test failed:"
docker logs "${name}"
exit 1
fi
done
- name: Logs
if: always()
run: docker-compose logs
- name: Stop containers
if: always()
run: docker-compose down --volumes --remove-orphans