Skip to content

Commit dcdee5b

Browse files
committed
fix: increase propagation wait and add health check before smoke test
1 parent 630f80a commit dcdee5b

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,27 @@ jobs:
7676

7777
- name: Wait for propagation
7878
run: |
79-
echo "Waiting 5s for Modal deployment to propagate..."
80-
sleep 5
79+
echo "Waiting 30s for Modal deployment to propagate..."
80+
sleep 30
81+
82+
- name: Health check
83+
run: |
84+
HEALTH_URL="${{ secrets.MODAL_WEBHOOK_URL }}/health"
85+
if [ -n "$HEALTH_URL" ] && [ "$HEALTH_URL" != "/health" ]; then
86+
for i in $(seq 1 15); do
87+
if curl -sf "$HEALTH_URL" > /dev/null 2>&1; then
88+
echo "Runner health check passed"
89+
exit 0
90+
fi
91+
echo "Waiting for runner... ($i/15)"
92+
sleep 2
93+
done
94+
echo "Health check failed — runner not responding"
95+
exit 1
96+
else
97+
echo "MODAL_WEBHOOK_URL not configured, skipping health check"
98+
sleep 10
99+
fi
81100
82101
# ── Stage 3: Smoke Test (confirms runner is alive) ──────────────────
83102
smoke-test:

0 commit comments

Comments
 (0)