diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8d78c2e..810d321 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -42,16 +42,22 @@ jobs: - name: Warm up staging services run: | echo "Waking up Render free-tier services..." - url="${{ secrets.STAGING_PRECHECK_URL }}/api/v1/health" - echo "Pinging $url" - for i in $(seq 1 10); do - if curl -sf --max-time 30 --connect-timeout 10 "$url" -o /dev/null; then - echo " ✓ precheck is up" - break - fi - echo " waiting... ($i/10)" - sleep 15 - done + warm() { + local label="$1" url="$2" + echo "Pinging $label at $url" + for i in $(seq 1 10); do + if curl -sf --max-time 30 --connect-timeout 10 "$url" -o /dev/null; then + echo " ✓ $label is up" + return 0 + fi + echo " waiting for $label... ($i/10)" + sleep 15 + done + echo " ✗ $label did not respond after 10 attempts (continuing anyway)" + } + warm precheck "${{ secrets.STAGING_PRECHECK_URL }}/api/v1/health" + warm chat "${{ secrets.STAGING_CHAT_URL }}/login" + warm platform "${{ secrets.STAGING_PLATFORM_URL }}" - name: Run E2E tests run: pnpm test:e2e