Skip to content

Commit a3698ca

Browse files
committed
ci: use system Chrome instead of downloading Chromium in CI
npx playwright install chromium hangs after download (extraction phase never exits). ubuntu-latest ships google-chrome-stable; use channel: 'chrome' in CI so Playwright picks it up with no download. Drops the browser binary install step from both e2e and integration workflows. Keeps install-deps for system library requirements. Refs #144
1 parent 27b038e commit a3698ca

4 files changed

Lines changed: 16 additions & 26 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,9 @@ jobs:
2323

2424
- run: npm ci
2525

26-
- name: Cache Playwright browsers
27-
uses: actions/cache@v4
28-
with:
29-
path: ~/.cache/ms-playwright
30-
key: playwright-chromium-${{ runner.os }}-${{ hashFiles('app/packages/web/package-lock.json', 'package-lock.json') }}
31-
3226
- name: Install Playwright system dependencies
3327
run: DEBIAN_FRONTEND=noninteractive npx playwright install-deps chromium
3428
working-directory: app/packages/web
35-
timeout-minutes: 5
36-
37-
- name: Install Playwright browser binaries
38-
run: npx playwright install chromium
39-
working-directory: app/packages/web
40-
timeout-minutes: 5
4129

4230
- run: npm run app:test:e2e
4331

.github/workflows/integration.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,9 @@ jobs:
2323

2424
- run: npm ci
2525

26-
- name: Cache Playwright browsers
27-
uses: actions/cache@v4
28-
with:
29-
path: ~/.cache/ms-playwright
30-
key: playwright-chromium-${{ runner.os }}-${{ hashFiles('app/packages/web/package-lock.json', 'package-lock.json') }}
31-
3226
- name: Install Playwright system dependencies
3327
run: DEBIAN_FRONTEND=noninteractive npx playwright install-deps chromium
3428
working-directory: app/packages/web
35-
timeout-minutes: 5
36-
37-
- name: Install Playwright browser binaries
38-
run: npx playwright install chromium
39-
working-directory: app/packages/web
40-
timeout-minutes: 5
4129

4230
- run: npm run app:test:integration
4331

app/packages/web/playwright.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ export default defineConfig({
1515
video: 'retain-on-failure',
1616
},
1717
projects: [
18-
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
18+
{
19+
name: 'chromium',
20+
use: {
21+
...devices['Desktop Chrome'],
22+
// In CI use the pre-installed system Chrome to avoid downloading Chromium
23+
...(process.env.CI ? { channel: 'chrome' } : {}),
24+
},
25+
},
1926
],
2027
webServer: {
2128
command: 'npm run build && npm run preview',

app/packages/web/playwright.integration.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ export default defineConfig({
2222
video: 'retain-on-failure',
2323
},
2424
projects: [
25-
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
25+
{
26+
name: 'chromium',
27+
use: {
28+
...devices['Desktop Chrome'],
29+
// In CI use the pre-installed system Chrome to avoid downloading Chromium
30+
...(process.env.CI ? { channel: 'chrome' } : {}),
31+
},
32+
},
2633
],
2734
webServer: [
2835
{

0 commit comments

Comments
 (0)