Bump form-data from 4.0.0 to 4.0.4 in /anms-ui/public #289
Workflow file for this run
This file contains hidden or 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: {} # any target | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| jobs: | |
| podman-checkout-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| AUTHNZ_EMU: "demo" | |
| ANMS_COMPOSE_OPTS: "-f docker-compose.yml" | |
| TESTENV_COMPOSE_OPTS: "-f testenv-compose.yml" | |
| DOCKER_CMD: "podman" | |
| AUTHNZ_PORT: 8084 | |
| AUTHNZ_HTTPS_PORT: 8443 | |
| steps: | |
| - name: Start Podman API Service | |
| run: | | |
| systemctl --user start podman.socket | |
| systemctl --user enable podman.socket | |
| export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock | |
| - name: Versions | |
| run: | | |
| podman -v | |
| podman ps | |
| podman compose ls | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Tag name env | |
| run: | | |
| DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g') | |
| echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV | |
| - name: Build Main | |
| run: podman compose ${ANMS_COMPOSE_OPTS} build | |
| - name: Build Agents | |
| run: podman compose ${TESTENV_COMPOSE_OPTS} build | |
| - name: Build Volume | |
| run: | | |
| ./create_volume.sh ./puppet/modules/apl_test/files/anms/tls | |
| sudo mkdir /run/anms | |
| - name: Start | |
| run: | | |
| podman compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate | |
| podman compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate | |
| sleep 5 | |
| - name: Status | |
| run: | | |
| for BADSTATUS in stopped restarting; do | |
| podman 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 | |
| podman 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 | |
| podman build -t checkout-test checkout-test | |
| podman 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 TESTENV_COMPOSE_OPTS ANMS_COMPOSE_OPTS; do | |
| podman compose ${!OPTS_NAME} down --remove-orphans | |
| done | |
| docker-checkout-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| AUTHNZ_EMU: "demo" | |
| ANMS_COMPOSE_OPTS: "-f docker-compose.yml" | |
| TESTENV_COMPOSE_OPTS: "-f testenv-compose.yml" | |
| DOCKER_CMD: "docker" | |
| steps: | |
| - name: Versions | |
| run: | | |
| docker -v | |
| docker ps | |
| docker compose ls | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Tag name env | |
| run: | | |
| DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g') | |
| echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV | |
| - name: Debug GitHub workspace | |
| run: | | |
| echo "GITHUB_WORKSPACE=${{ github.workspace }}" | |
| ls -al ${{ github.workspace }} | |
| - name: Build Main | |
| run: docker compose ${ANMS_COMPOSE_OPTS} build | |
| - name: Build Agents | |
| run: docker compose ${TESTENV_COMPOSE_OPTS} build | |
| - name: Build Volume | |
| run: | | |
| ./create_volume.sh ./puppet/modules/apl_test/files/anms/tls | |
| sudo mkdir /run/anms | |
| - name: Start | |
| run: | | |
| docker compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate | |
| docker compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate | |
| 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 TESTENV_COMPOSE_OPTS ANMS_COMPOSE_OPTS; do | |
| docker compose ${!OPTS_NAME} down --remove-orphans | |
| done |