debug(ci): Add Playwright verbose output and reduce job timeout

Investigation Phase:

Problem:
- Tests hang AFTER global setup completes
- No test execution begins (hung before first test)
- Step timeout (15min) doesn't trigger properly
- Job timeout (45min) eventually kills process after 44min

Changes:
1. Added DEBUG=pw:api to all browser jobs
   - Will show exact Playwright API calls
   - Pinpoint where execution hangs (auth setup vs browser launch vs test init)

2. Reduced job timeout: 45min → 20min
   - Fail faster when tests hang
   - Reduces wasted CI resources
   - Still allows normal test execution (local: 1.2min)

Expected Outcome:
- Verbose logs reveal hang location
- Faster feedback loop (20min vs 44min)
- Can identify if issue is:
  * auth.setup.ts hanging
  * Browser process not launching
  * Connection issues to application

Next Steps Based on Logs:
- If browser launch hangs: Add dumb-init (Phase 3)
- If auth setup hangs: Investigate cookie/storage state
- If network hangs: Add localhost loopback routing

Phase: 2.5 of 3 (Diagnostic Logging)
See: docs/plans/ci_hang_remediation.md
This commit is contained in:
GitHub Actions
2026-02-04 21:11:13 +00:00
parent ff1bb06f60
commit 89dc5650e1

View File

@@ -121,7 +121,7 @@ jobs:
if: |
(github.event_name != 'workflow_dispatch') ||
(github.event.inputs.browser == 'chromium' || github.event.inputs.browser == 'all')
timeout-minutes: 45
timeout-minutes: 20
env:
CHARON_EMERGENCY_TOKEN: ${{ secrets.CHARON_EMERGENCY_TOKEN }}
CHARON_EMERGENCY_SERVER_ENABLED: "true"
@@ -223,6 +223,9 @@ jobs:
SHARD_START=$(date +%s)
echo "SHARD_START=$SHARD_START" >> $GITHUB_ENV
# Enable verbose Playwright output to diagnose hang
export DEBUG=pw:api
npx playwright test \
--project=chromium \
--shard=${{ matrix.shard }}/${{ matrix.total-shards }}
@@ -287,7 +290,7 @@ jobs:
if: |
(github.event_name != 'workflow_dispatch') ||
(github.event.inputs.browser == 'firefox' || github.event.inputs.browser == 'all')
timeout-minutes: 45
timeout-minutes: 20
env:
CHARON_EMERGENCY_TOKEN: ${{ secrets.CHARON_EMERGENCY_TOKEN }}
CHARON_EMERGENCY_SERVER_ENABLED: "true"
@@ -397,6 +400,9 @@ jobs:
SHARD_START=$(date +%s)
echo "SHARD_START=$SHARD_START" >> $GITHUB_ENV
# Enable verbose Playwright output to diagnose hang
export DEBUG=pw:api
npx playwright test \
--project=firefox \
--shard=${{ matrix.shard }}/${{ matrix.total-shards }}
@@ -461,7 +467,7 @@ jobs:
if: |
(github.event_name != 'workflow_dispatch') ||
(github.event.inputs.browser == 'webkit' || github.event.inputs.browser == 'all')
timeout-minutes: 45
timeout-minutes: 20
env:
CHARON_EMERGENCY_TOKEN: ${{ secrets.CHARON_EMERGENCY_TOKEN }}
CHARON_EMERGENCY_SERVER_ENABLED: "true"
@@ -571,6 +577,9 @@ jobs:
SHARD_START=$(date +%s)
echo "SHARD_START=$SHARD_START" >> $GITHUB_ENV
# Enable verbose Playwright output to diagnose hang
export DEBUG=pw:api
npx playwright test \
--project=webkit \
--shard=${{ matrix.shard }}/${{ matrix.total-shards }}