Skip to content

Commit c1e7494

Browse files
committed
ci: retry Playwright browser install to survive cdn.playwright.dev stalls
The release and CI jobs hung for their full duration on "Install Playwright browsers": apt --with-deps completed fine, then the browser-binary download from cdn.playwright.dev stalled with no built-in timeout. Wrap the install in a per-attempt timeout (480s ci, 540s release) and retry up to 3 times so a stalled download fails fast and re-fetches on a fresh connection.
1 parent 7f53e64 commit c1e7494

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ jobs:
2828
- run: bun run build
2929
- run: bun run test
3030
- name: Install Playwright browsers
31-
run: bunx playwright install --with-deps chromium
31+
# cdn.playwright.dev browser-binary downloads occasionally stall with no
32+
# built-in timeout, hanging the job. Cap each attempt and retry.
33+
run: |
34+
for i in 1 2 3; do
35+
timeout 480 bunx playwright install --with-deps chromium && exit 0
36+
echo "::warning::Playwright install attempt $i stalled or failed; retrying"
37+
sleep 10
38+
done
39+
echo "::error::Playwright browser download failed after 3 attempts"; exit 1
3240
- run: bun run test:e2e
3341
env:
3442
PLAYWRIGHT_PROJECTS: chromium

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,16 @@ jobs:
7777

7878
- name: Install Playwright browsers
7979
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
80-
run: bunx playwright install --with-deps chromium firefox webkit
80+
# cdn.playwright.dev browser-binary downloads occasionally stall with no
81+
# built-in timeout, hanging the job for its full duration. Cap each
82+
# attempt and retry so a stalled download fails fast and re-fetches.
83+
run: |
84+
for i in 1 2 3; do
85+
timeout 540 bunx playwright install --with-deps chromium firefox webkit && exit 0
86+
echo "::warning::Playwright install attempt $i stalled or failed; retrying"
87+
sleep 10
88+
done
89+
echo "::error::Playwright browser download failed after 3 attempts (cdn.playwright.dev stall)"; exit 1
8190
8291
- name: E2E tests
8392
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)