Remove <AppointmentsForPatientStatic>
#858
Workflow file for this run
This file contains 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: ci:build:compose | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Continuous integration (build compose) | |
strategy: | |
matrix: | |
platform: | |
- ubuntu-latest | |
runs-on: ${{ matrix.platform }} | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Wait for image build workflow to succeed | |
uses: ArcticLampyrid/[email protected] | |
with: | |
workflow: ci:build:image.yml | |
sha: auto | |
timeout-minutes: 15 # NOTE We build without a fresh cache on timeout. | |
continue-on-error: true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Bake 🧑🍳 | |
uses: docker/bake-action@v4 | |
with: | |
files: | | |
compose.yaml | |
set: | | |
patient-web.cache-from=type=gha | |
patient-web.output=type=docker,dest=/tmp/patient-web.tar | |
patient-web.tags=patients-patient-web | |
- 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) | |
needs: | |
- build | |
strategy: | |
matrix: | |
platform: | |
- ubuntu-latest | |
runs-on: ${{ matrix.platform }} | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Download image | |
uses: actions/download-artifact@v4 | |
with: | |
name: images-patient-web | |
path: /tmp/images | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Load image | |
run: | | |
docker image load --input /tmp/images/patient-web.tar | |
- name: Start | |
run: | | |
docker compose up --no-build --detach | |
- id: patient-db-container | |
uses: ./.github/actions/docker/compose/container | |
with: | |
service: patient-db | |
- name: Wait for database container to be healthy | |
uses: ./.github/actions/docker/container/is-healthy | |
with: | |
container: ${{ steps.patient-db-container.outputs.id }} | |
timeout: 60 | |
- name: Wait for web port to be available | |
uses: ./.github/actions/network/is-reachable | |
with: | |
timeout: 60 | |
port: 3000 | |
- id: patient-web-container | |
uses: ./.github/actions/docker/compose/container | |
with: | |
service: patient-web | |
- name: Wait for web container to be healthy | |
uses: ./.github/actions/docker/container/is-healthy | |
with: | |
container: ${{ steps.patient-web-container.outputs.id }} | |
timeout: 60 | |
- 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 |