From f3e019fe728f6689b9922ba8ae0481fd3dc90618 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 6 Nov 2024 15:32:08 +0000 Subject: [PATCH] Add wait for healthcheck --- .github/actions/test/action.yml | 15 ++++++++++++--- .github/workflows/build.yml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index f4bcfa9..7e89070 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -42,9 +42,18 @@ runs: echo "PORT=$PORT" >> "$GITHUB_ENV" docker compose up ${{ inputs.service }} -d shell: bash - # - name: Test healthcheck endpoint - # run: curl http://localhost:82/healthcheck/live/ - # shell: bash + + + - name: Sleep for 30 seconds + uses: jakejarvis/wait-action@master + with: + time: '30s' + + + + - name: Test healthcheck endpoint + run: curl http://localhost:82/healthcheck/live/ + shell: bash - name: Wait for healthcheck uses: gerdemann/http-status-code@1.0.0 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbb1e16..04e4853 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,7 +78,7 @@ jobs: major-version: ${{ steps.build.outputs.major-version }} minor-version: ${{ steps.build.outputs.minor-version }} base-image: ghcr.io/nationalarchives/tna-python - docker-context: docker/tna-python-root + docker-context: docker/tna-python github-token: ${{ secrets.GITHUB_TOKEN }} python-django: