Skip to content
Merged
Show file tree
Hide file tree
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
30 changes: 20 additions & 10 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,26 @@ 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

warmup() {
local name="$1"
local url="$2"
echo "Pinging $name at $url"
for i in $(seq 1 10); do
if curl -sfL --max-time 60 --connect-timeout 10 "$url" -o /dev/null; then
echo " ✓ $name is up"
return 0
fi
echo " $name waiting... ($i/10)"
sleep 15
done
echo " ✗ $name failed to wake up after 10 attempts"
return 1
}

warmup precheck "${{ secrets.STAGING_PRECHECK_URL }}/api/v1/health"
warmup keycloak "${{ secrets.STAGING_KEYCLOAK_URL }}/realms/governs-ai/.well-known/openid-configuration"
warmup chat "${{ secrets.STAGING_CHAT_URL }}/login"

- name: Run E2E tests
run: pnpm test:e2e
Expand Down
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export default defineConfig({
retries: process.env.CI ? 1 : 0,
workers: 1,
reporter: process.env.CI ? [['github'], ['html', { open: 'never' }]] : 'list',
timeout: 60_000,
timeout: 120_000,
expect: { timeout: 15_000 },
use: {
baseURL: CHAT_URL,
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
actionTimeout: 15_000,
navigationTimeout: 30_000,
navigationTimeout: 60_000,
},
projects: [
{
Expand Down
Loading