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
210 changes: 192 additions & 18 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,38 @@ jobs:

- name: Start server
run: |
npx serve out -l 3000 &
sleep 5
npx wait-on http://localhost:3000 --timeout 60000
set -euo pipefail
npx serve out -l 3000 > serve.log 2>&1 &
SERVE_PID=$!
echo "serve started, PID=$SERVE_PID"

# Brief grace period for the child to spawn; wait-on does the real polling.
sleep 2

# Verify serve didn't already exit (port in use, missing out/, etc.).
if ! kill -0 "$SERVE_PID" 2>/dev/null; then
echo "::error::serve exited immediately after launch"
echo "--- serve.log ---"
cat serve.log || true
exit 1
fi

# Explicit exit-code propagation. Don't rely on -e interacting cleanly
# with backgrounded jobs.
if ! npx wait-on http://localhost:3000 --timeout 60000 --verbose; then
echo "::error::wait-on timed out — serve never bound to port 3000 within 60s"
echo "--- serve.log ---"
cat serve.log || true
echo "--- listening sockets ---"
ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
echo "--- serve process state ---"
ps -fp "$SERVE_PID" 2>/dev/null || echo "serve process $SERVE_PID is gone"
echo "--- direct curl attempt ---"
curl -v --max-time 5 http://localhost:3000/ 2>&1 || true
exit 1
fi

echo "serve is responding on http://localhost:3000"

- name: Run smoke tests (sign-up only - auth tests run after auth-setup)
run: |
Expand Down Expand Up @@ -183,9 +212,38 @@ jobs:

- name: Start server
run: |
npx serve out -l 3000 &
sleep 5
npx wait-on http://localhost:3000 --timeout 60000
set -euo pipefail
npx serve out -l 3000 > serve.log 2>&1 &
SERVE_PID=$!
echo "serve started, PID=$SERVE_PID"

# Brief grace period for the child to spawn; wait-on does the real polling.
sleep 2

# Verify serve didn't already exit (port in use, missing out/, etc.).
if ! kill -0 "$SERVE_PID" 2>/dev/null; then
echo "::error::serve exited immediately after launch"
echo "--- serve.log ---"
cat serve.log || true
exit 1
fi

# Explicit exit-code propagation. Don't rely on -e interacting cleanly
# with backgrounded jobs.
if ! npx wait-on http://localhost:3000 --timeout 60000 --verbose; then
echo "::error::wait-on timed out — serve never bound to port 3000 within 60s"
echo "--- serve.log ---"
cat serve.log || true
echo "--- listening sockets ---"
ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
echo "--- serve process state ---"
ps -fp "$SERVE_PID" 2>/dev/null || echo "serve process $SERVE_PID is gone"
echo "--- direct curl attempt ---"
curl -v --max-time 5 http://localhost:3000/ 2>&1 || true
exit 1
fi

echo "serve is responding on http://localhost:3000"

- name: Run rate-limiting tests (ordered)
run: pnpm test:e2e --project=rate-limiting --project=brute-force --project=signup --reporter=list --trace=on-first-retry
Expand Down Expand Up @@ -245,9 +303,38 @@ jobs:

- name: Start server
run: |
npx serve out -l 3000 &
sleep 5
npx wait-on http://localhost:3000 --timeout 60000
set -euo pipefail
npx serve out -l 3000 > serve.log 2>&1 &
SERVE_PID=$!
echo "serve started, PID=$SERVE_PID"

# Brief grace period for the child to spawn; wait-on does the real polling.
sleep 2

# Verify serve didn't already exit (port in use, missing out/, etc.).
if ! kill -0 "$SERVE_PID" 2>/dev/null; then
echo "::error::serve exited immediately after launch"
echo "--- serve.log ---"
cat serve.log || true
exit 1
fi

# Explicit exit-code propagation. Don't rely on -e interacting cleanly
# with backgrounded jobs.
if ! npx wait-on http://localhost:3000 --timeout 60000 --verbose; then
echo "::error::wait-on timed out — serve never bound to port 3000 within 60s"
echo "--- serve.log ---"
cat serve.log || true
echo "--- listening sockets ---"
ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
echo "--- serve process state ---"
ps -fp "$SERVE_PID" 2>/dev/null || echo "serve process $SERVE_PID is gone"
echo "--- direct curl attempt ---"
curl -v --max-time 5 http://localhost:3000/ 2>&1 || true
exit 1
fi

echo "serve is responding on http://localhost:3000"

- name: Run auth setup
run: pnpm exec playwright test --project=setup --reporter=list --timeout=180000
Expand Down Expand Up @@ -352,9 +439,38 @@ jobs:

- name: Start server
run: |
npx serve out -l 3000 &
sleep 5
npx wait-on http://localhost:3000 --timeout 60000
set -euo pipefail
npx serve out -l 3000 > serve.log 2>&1 &
SERVE_PID=$!
echo "serve started, PID=$SERVE_PID"

# Brief grace period for the child to spawn; wait-on does the real polling.
sleep 2

# Verify serve didn't already exit (port in use, missing out/, etc.).
if ! kill -0 "$SERVE_PID" 2>/dev/null; then
echo "::error::serve exited immediately after launch"
echo "--- serve.log ---"
cat serve.log || true
exit 1
fi

# Explicit exit-code propagation. Don't rely on -e interacting cleanly
# with backgrounded jobs.
if ! npx wait-on http://localhost:3000 --timeout 60000 --verbose; then
echo "::error::wait-on timed out — serve never bound to port 3000 within 60s"
echo "--- serve.log ---"
cat serve.log || true
echo "--- listening sockets ---"
ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
echo "--- serve process state ---"
ps -fp "$SERVE_PID" 2>/dev/null || echo "serve process $SERVE_PID is gone"
echo "--- direct curl attempt ---"
curl -v --max-time 5 http://localhost:3000/ 2>&1 || true
exit 1
fi

echo "serve is responding on http://localhost:3000"
env:
CI: true

Expand Down Expand Up @@ -482,9 +598,38 @@ jobs:
path: tests/e2e/fixtures/
- name: Start server
run: |
npx serve out -l 3000 &
sleep 5
npx wait-on http://localhost:3000 --timeout 60000
set -euo pipefail
npx serve out -l 3000 > serve.log 2>&1 &
SERVE_PID=$!
echo "serve started, PID=$SERVE_PID"

# Brief grace period for the child to spawn; wait-on does the real polling.
sleep 2

# Verify serve didn't already exit (port in use, missing out/, etc.).
if ! kill -0 "$SERVE_PID" 2>/dev/null; then
echo "::error::serve exited immediately after launch"
echo "--- serve.log ---"
cat serve.log || true
exit 1
fi

# Explicit exit-code propagation. Don't rely on -e interacting cleanly
# with backgrounded jobs.
if ! npx wait-on http://localhost:3000 --timeout 60000 --verbose; then
echo "::error::wait-on timed out — serve never bound to port 3000 within 60s"
echo "--- serve.log ---"
cat serve.log || true
echo "--- listening sockets ---"
ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
echo "--- serve process state ---"
ps -fp "$SERVE_PID" 2>/dev/null || echo "serve process $SERVE_PID is gone"
echo "--- direct curl attempt ---"
curl -v --max-time 5 http://localhost:3000/ 2>&1 || true
exit 1
fi

echo "serve is responding on http://localhost:3000"
env:
CI: true
- name: Prime Supabase connection pool
Expand Down Expand Up @@ -596,9 +741,38 @@ jobs:
path: tests/e2e/fixtures/
- name: Start server
run: |
npx serve out -l 3000 &
sleep 5
npx wait-on http://localhost:3000 --timeout 60000
set -euo pipefail
npx serve out -l 3000 > serve.log 2>&1 &
SERVE_PID=$!
echo "serve started, PID=$SERVE_PID"

# Brief grace period for the child to spawn; wait-on does the real polling.
sleep 2

# Verify serve didn't already exit (port in use, missing out/, etc.).
if ! kill -0 "$SERVE_PID" 2>/dev/null; then
echo "::error::serve exited immediately after launch"
echo "--- serve.log ---"
cat serve.log || true
exit 1
fi

# Explicit exit-code propagation. Don't rely on -e interacting cleanly
# with backgrounded jobs.
if ! npx wait-on http://localhost:3000 --timeout 60000 --verbose; then
echo "::error::wait-on timed out — serve never bound to port 3000 within 60s"
echo "--- serve.log ---"
cat serve.log || true
echo "--- listening sockets ---"
ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
echo "--- serve process state ---"
ps -fp "$SERVE_PID" 2>/dev/null || echo "serve process $SERVE_PID is gone"
echo "--- direct curl attempt ---"
curl -v --max-time 5 http://localhost:3000/ 2>&1 || true
exit 1
fi

echo "serve is responding on http://localhost:3000"
env:
CI: true
- name: Prime Supabase connection pool
Expand Down
Loading