29 anms fun dap 002 received reports missing reports #43
Workflow file for this run
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: Run integration checkout test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
checkout-test: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: "1" | |
DOCKER_IMAGE_TAG: ${{ github.head_ref || github.ref_name }} | |
AUTHNZ_EMU: "1" | |
ANMS_COMPOSE_OPTS: "-f docker-compose.yml -p anms" | |
AGENT_COMPOSE_OPTS: "-f agent-compose.yml -p agents" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build | |
run: | | |
./build.sh buildonly | |
./create_volume.sh ./puppet/modules/apl_test/files/anms/tls | |
- name: Start | |
run: | | |
for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do | |
docker-compose ${!OPTS_NAME} up --detach --force-recreate | |
done | |
sleep 5 | |
- name: Status | |
run: | | |
for BADSTATUS in stopped restarting; do | |
docker-compose ${ANMS_COMPOSE_OPTS} ps --services --filter status=${BADSTATUS} | tee -a /tmp/notgood | |
done | |
# Show hints at what may be wrong | |
for SERVNAME in $(cat /tmp/notgood); do | |
docker-compose ${ANMS_COMPOSE_OPTS} logs --tail 50 ${SERVNAME} | |
done | |
# Fail if any names are in the file | |
! grep '[^[:space:]]' /tmp/notgood | |
- name: Test | |
run: | | |
# Checkout the running gateway+backend | |
docker build -t checkout-test checkout-test | |
docker run --network anms -v $PWD:/mnt -e XUNIT_OUTFILE=/mnt/testresults.xml -e CHECKOUT_BASE_URL=http://authnz/ -e SSL_CERT_FILE=/mnt/puppet/modules/apl_test/files/anms/tls/certs/ammos-ca-bundle.crt checkout-test | |
- name: Stop | |
if: always() | |
run: | | |
for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do | |
docker-compose ${!OPTS_NAME} rm --stop --force | |
done |