From 8cb3a9ee67a4c17008d94c686fe58e170d66a99b Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 12 Nov 2025 00:26:36 +0000 Subject: [PATCH] Add healthcheck wait and container logging to integration tests Integration tests were failing because the workflow didn't wait for containers to be healthy before running Playwright tests. Changes: - Wait for mock-github container healthcheck to pass (60s timeout) - Wait for pulse-test-server healthcheck to pass (60s timeout) - Output container logs if healthcheck fails for debugging - Remove arbitrary sleep 20 in favor of actual healthcheck verification This will help diagnose why the pulse server isn't responding on port 7655. Related to workflow run 19281966710. --- .github/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46bc598..4acc160 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,8 +89,23 @@ jobs: MOCK_STALE_RELEASE: "false" run: | docker-compose -f docker-compose.test.yml up -d - # Allow services to settle before running Playwright - sleep 20 + + # Wait for services to be healthy + echo "Waiting for mock-github to be healthy..." + timeout 60 sh -c 'until docker inspect --format="{{json .State.Health.Status}}" pulse-mock-github | grep -q "healthy"; do sleep 2; done' || { + echo "Mock GitHub failed to become healthy" + docker logs pulse-mock-github + exit 1 + } + + echo "Waiting for pulse-test-server to be healthy..." + timeout 60 sh -c 'until docker inspect --format="{{json .State.Health.Status}}" pulse-test-server | grep -q "healthy"; do sleep 2; done' || { + echo "Pulse server failed to become healthy" + docker logs pulse-test-server + exit 1 + } + + echo "All services healthy, running tests..." npx playwright test tests/01-happy-path.spec.ts tests/02-bad-checksums.spec.ts --reporter=list docker-compose -f docker-compose.test.yml down -v