Skip to content

Commit 366d8e2

Browse files
fix(ci): split Playwright install to prevent hang on GitHub Actions (#152)
The combined 'npx playwright install --with-deps chromium' command has been hanging after Chrome download completes on newer GitHub Actions runner images since May 29, causing every daily test run to time out at the 6-hour job limit. Split into two separate steps: - 'npx playwright install-deps chromium' for system dependencies (with DEBIAN_FRONTEND=noninteractive and NEEDRESTART_MODE=a) - 'npx playwright install chromium' for browser binaries Both steps have a 5-minute timeout to fail fast if they hang again. Applied to both daily-tests.yml and pr-tests.yml workflows.
1 parent d7e581b commit 366d8e2

2 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/workflows/daily-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,16 @@ jobs:
9999
npm ci
100100
npm run build
101101
102-
- name: Install Playwright browsers (for browser platform only)
103-
run: npx playwright install --with-deps chromium
102+
- name: Install Playwright system dependencies
103+
run: npx playwright install-deps chromium
104+
env:
105+
DEBIAN_FRONTEND: noninteractive
106+
NEEDRESTART_MODE: a
107+
timeout-minutes: 5
108+
109+
- name: Install Playwright browsers
110+
run: npx playwright install chromium
111+
timeout-minutes: 5
104112

105113
- name: Run tests
106114
continue-on-error: true

.github/workflows/pr-tests.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,16 @@ jobs:
9292
npm ci
9393
npm run build
9494
95-
- name: Install Playwright browsers (for browser platform only)
96-
run: npx playwright install --with-deps chromium
95+
- name: Install Playwright system dependencies
96+
run: npx playwright install-deps chromium
97+
env:
98+
DEBIAN_FRONTEND: noninteractive
99+
NEEDRESTART_MODE: a
100+
timeout-minutes: 5
101+
102+
- name: Install Playwright browsers
103+
run: npx playwright install chromium
104+
timeout-minutes: 5
97105

98106
- name: Run tests
99107
id: run-tests
@@ -193,8 +201,16 @@ jobs:
193201
npm ci
194202
npm run build
195203
196-
- name: Install Playwright browsers (for browser platform only)
197-
run: npx playwright install --with-deps chromium
204+
- name: Install Playwright system dependencies
205+
run: npx playwright install-deps chromium
206+
env:
207+
DEBIAN_FRONTEND: noninteractive
208+
NEEDRESTART_MODE: a
209+
timeout-minutes: 5
210+
211+
- name: Install Playwright browsers
212+
run: npx playwright install chromium
213+
timeout-minutes: 5
198214

199215
- name: Run tests
200216
id: run-tests

0 commit comments

Comments
 (0)