Port existing frontend UI to Angular #635
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: Build and run tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} # any target | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| jobs: | |
| podman-checkout-test: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ctrmgr: ['docker', 'podman'] | |
| name: Checkout Test (${{matrix.ctrmgr}}) | |
| env: | |
| AUTHNZ_EMU: "demo" | |
| COMPOSE_PROFILES: "full" | |
| ANMS_COMPOSE_OPTS: "-f docker-compose.yml" | |
| TESTENV_COMPOSE_OPTS: "-f testenv-compose.yml" | |
| DOCKER_CMD: ${{matrix.ctrmgr}} | |
| AUTHNZ_PORT: 8084 | |
| AUTHNZ_HTTPS_PORT: 8443 | |
| steps: | |
| - name: Install Podman | |
| if: ${{matrix.ctrmgr == 'podman'}} | |
| uses: redhat-actions/podman-install@5bc2ecc87c737059124c295845be51ee7297fb89 | |
| - name: Start Container Service | |
| if: ${{matrix.ctrmgr == 'podman'}} | |
| run: systemctl --user start podman.socket | |
| - name: Versions | |
| run: | | |
| ${DOCKER_CMD} -v | |
| ${DOCKER_CMD} compose -v | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Tag name env | |
| run: | | |
| DOCKER_IMAGE_TAG=${{ github.sha }} | |
| echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV | |
| - name: Build ANMS | |
| run: ${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} build | |
| - name: Build Agents | |
| run: ${DOCKER_CMD} compose ${TESTENV_COMPOSE_OPTS} build | |
| - name: Build Volume | |
| run: | | |
| ./create_volume.sh ./puppet/modules/apl_test/files/anms/tls | |
| sudo mkdir /run/anms | |
| - name: Pull Images | |
| run: ${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} pull --ignore-buildable | |
| - name: Start | |
| run: | | |
| # testenv started before | |
| ${DOCKER_CMD} compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate | |
| ${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate --wait --wait-timeout 600 | |
| - name: Status | |
| if: always() | |
| run: | | |
| ${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} ps | |
| for BADSTATUS in stopped restarting; do | |
| ${DOCKER_CMD} 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_CMD} 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-test/run.sh | |
| - name: Stop | |
| if: always() | |
| run: | | |
| # testenv stopped after | |
| for OPTS_NAME in ANMS_COMPOSE_OPTS TESTENV_COMPOSE_OPTS; do | |
| ${DOCKER_CMD} compose ${!OPTS_NAME} down --remove-orphans | |
| done |