Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,21 @@ jobs:
# Require healthStatus=ok (not just HTTP 200), because /health returns
# 200 even when the database is degraded — letting smoke tests run too
# early and fail with SQLSTATE[HY000] [2002] Connection refused.
for i in $(seq 1 60); do
#
# 120s budget: the app container's init does composer install +
# ./init.sh + apache startup, which can take 60-90s on a cold GitHub
# Actions runner. MySQL is also still finishing its first-boot init at
# the start of this window. Don't reduce below ~90s without checking
# tail-end runs on actually-slow runners.
for i in $(seq 1 120); do
status=$(curl -fsS http://localhost:8080/health/index 2>/dev/null | jq -r '.Data.healthStatus // "unknown"')
if [ "$status" = "ok" ]; then
echo "App became healthy (healthStatus=ok) after ${i}s"
exit 0
fi
sleep 1
done
echo "App did not reach healthStatus=ok within 60s" >&2
echo "App did not reach healthStatus=ok within 120s" >&2
docker compose logs app | tail -100 >&2
docker compose logs mysql | tail -50 >&2
exit 1
Expand Down