Skip to content

Commit

Permalink
🚧 progress: Try to figure out what image name is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Apr 18, 2024
1 parent 0d66d5a commit d13be75
Showing 1 changed file with 39 additions and 8 deletions.
47 changes: 39 additions & 8 deletions .github/workflows/ci:build:compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,45 @@ jobs:
set: |
patient-web.cache-from=type=gha
patient-web.cache-to=type=gha,mode=max
patient-web.output=type=docker,dest=/tmp/patient-web.tar
patient-web.output=type=image
- 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:
name: Continuous integration (build compose test)
Expand Down Expand Up @@ -89,7 +120,7 @@ jobs:
- name: Start
run: |
docker compose up --detach
docker compose up --no-build --detach
- name: Wait for database container to be healthy
run: |
Expand Down

0 comments on commit d13be75

Please sign in to comment.