debug check web error #208
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 Check Tests | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - develop | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| check-script: | |
| runs-on: | |
| labels: check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} | |
| aws-region: eu-west-1 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Fix file permissions | |
| run: | | |
| sudo chmod -R u+w . | |
| sudo chown -R $USER:$USER . | |
| - name: Before script | |
| env: | |
| GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }} | |
| GITHUB_JOB_NAME: ${{ github.job }} | |
| run: | | |
| sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules | |
| git submodule update --init --recursive | |
| sed -i '/git submodule/d' bin/first-build.sh | |
| sed -i 's/--abort-on-container-exit/-d/' bin/first-build.sh | |
| TAB=$'\t' | |
| export FALLBACK_BRANCH=$([ "$GITHUB_BRANCH" == "master" ] && echo "main" && echo "master" || echo "develop") | |
| git submodule foreach bash -c 'git reset --hard && git checkout "${GITHUB_BRANCH}" || git checkout develop || git checkout master || git checkout main || git checkout "${FALLBACK_BRANCH}"' | |
| git submodule foreach git rev-parse --abbrev-ref HEAD | |
| - name: Run Script | |
| env: | |
| GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }} | |
| GITHUB_JOB_NAME: ${{ github.job }} | |
| run: | | |
| ./bin/first-build.sh | |
| until curl --silent -I -f --fail http://localhost:3333 ; do printf .; sleep 1; done | |
| sleep 240 | |
| if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3200)!= "200" )); then exit 1; fi; | |
| if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3100)!= "200" )); then exit 1; fi; | |
| if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:8000/ping)!= "200" )); then exit 1; fi; | |
| if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3333)!= "200" )); then exit 1; fi; | |
| if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000)!= "200" )); then exit 1; fi; | |
| docker ps --format '{{.Image}}' | sort >> docker_up_output.txt | |
| diff <(grep -v 'moby/buildkit:buildx-stable-1' docker_up_output.txt) test/image_names.txt | |
| - name: Cleanup Docker Resources | |
| if: always() | |
| run: | | |
| echo "Running post-job cleanup..." | |
| docker stop $(docker ps -q) || true | |
| docker rm $(docker ps -aq) || true | |
| docker rmi $(docker images -q) || true | |
| docker volume rm $(docker volume ls -q) || true |