Skip to content

Commit

Permalink
.github/e2e: Make health checks more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
ix5 committed Apr 28, 2024
1 parent 9a37f0c commit 67ff13f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ jobs:
run: docker compose build isso-server

- name: Bring up containers
# Don't wait for healthcheck via --wait. This would fail with a
# negative exit code since the isso-client container is expected to
# exit
run: docker compose up -d

- name: Client unit tests
run: make docker-js-unit

- name: Check if containers are up, sleep if not
shell: bash
run: '[ "$(docker inspect --format={{.State.Health.Status}} isso-server)" = "healthy" ] || sleep 5'
- name: Wait for isso-server container to be ready
run: '(r=5;while ! [ "`docker inspect -f {{.State.Health.Status}} isso-server`"=="healthy" ]; do ((--r))||exit 1;sleep 1;done)'

- name: Client integration tests
run: make docker-js-integration
Expand Down

0 comments on commit 67ff13f

Please sign in to comment.