Skip to content

Commit 91eaf4d

Browse files
committed
Fix E2E tests: ensure baseURL is properly set and verify servers before tests
- Extract baseURL to constant in Playwright config for consistency - Add server verification step before running E2E tests - Ensure CI environment variable is set for Playwright - Add connection test before running Playwright tests
1 parent 3c23749 commit 91eaf4d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,22 @@ jobs:
310310
cat /tmp/frontend.log || echo "No frontend log found"
311311
exit 1
312312
313+
- name: Verify servers are running
314+
run: |
315+
echo "=== Verifying servers ==="
316+
curl -f -s http://localhost:8000/health && echo "✓ Backend is running" || echo "✗ Backend is not running"
317+
curl -f -s http://localhost:3000 && echo "✓ Frontend is running" || echo "✗ Frontend is not running"
318+
ps aux | grep -E "(uvicorn|node)" | grep -v grep || echo "No server processes found"
319+
313320
- name: Run E2E tests
314321
working-directory: tests
315322
env:
316323
E2E_BASE_URL: http://localhost:3000
317324
CI: true
318325
run: |
319326
echo "E2E_BASE_URL is set to: $E2E_BASE_URL"
327+
echo "Testing connection to frontend..."
328+
curl -f -s http://localhost:3000 > /dev/null && echo "Frontend is accessible" || echo "Frontend is not accessible"
320329
npx playwright test
321330
322331
- name: Upload Playwright report

0 commit comments

Comments
 (0)