Skip to content

Commit

Permalink
🚧 progress: Second attempt, with exclicit tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Apr 18, 2024
1 parent b6835fb commit 1ff449a
Showing 1 changed file with 7 additions and 37 deletions.
44 changes: 7 additions & 37 deletions .github/workflows/ci:build:compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,45 +44,15 @@ jobs:
compose.yaml
set: |
patient-web.cache-from=type=gha
patient-web.output=type=docker
patient-web.output=type=docker,dest=/tmp/patient-web.tar
patient-web.tags=patients-patient-web
- name: List images
run: |
docker image ls -a
- name: Start
run: |
docker compose up --no-build --detach
- name: Wait for database container to be healthy
run: |
timeout 60 bash -c \
'until docker inspect --format "{{json .State.Health }}" "$(docker compose ps -q patient-db)" | jq -e ".Status == \"healthy\"" ; do sleep 1; done'
- name: Wait for web port to be available
run: |
timeout 60 bash -c \
'until nc -z -v -w5 127.0.0.1 3000 ; do sleep 1; done'
- name: Wait for web container to be healthy
run: |
timeout 60 bash -c \
'until docker inspect --format "{{json .State.Health }}" "$(docker compose ps -q patient-web)" | jq -e ".Status == \"healthy\"" ; do sleep 1; done'
- name: Call healthcheck endpoint
run: |
timeout 60 bash -c \
'curl -f http://localhost:3000/api/healthcheck'
- name: Run healthcheck script
run: |
timeout 60 bash -c \
'node scripts/healthcheck.cjs http://localhost:3000/api/healthcheck'
- name: Stop
run: |
docker compose down
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: images-patient-web
path: /tmp/patient-web.tar
retention-days: 1


test:
Expand Down

0 comments on commit 1ff449a

Please sign in to comment.