Merge pull request #123 from glimchb/multipart #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
- 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 |