Skip to content

Commit e9096c7

Browse files
committed
ci(ecosystem): declare playwright via repo.json + force playwright >= 1.60
`npx playwright install chromium` wedges after the download bar reaches 100% under Node 24.16.0+ with Playwright < 1.60 (microsoft/playwright#40724, fixed in 1.60.0 via #40747). This was silently consuming the full 10-min timeout on vibe-dashboard, vitepress, tanstack-start-helloworld, and vitest-playwright-repro every nightly run, because vp env happens to pick 24.16.0 for them. Make Playwright a first-class declaration: - repo.json gains `"playwright": true` on the 5 projects that need it (vibe-dashboard, vitepress, tanstack-start-helloworld, vitest-playwright-repro, vite-vue-vercel). - patch-project.ts reads the flag and writes a `pnpm.overrides.playwright` entry pinned to `^1.60.0`. The override applies uniformly across direct deps, catalog entries (vibe-dashboard), and transitive-only cases (vitest-playwright-repro via @vitest/browser-playwright). - e2e-test.yml adds a single `Install Playwright chromium` step gated on the repo.json flag (read via jq), removing the duplicated `npx playwright install chromium` lines from the 5 per-project command blocks.
1 parent 7462562 commit e9096c7

3 files changed

Lines changed: 39 additions & 10 deletions

File tree

.github/workflows/e2e-test.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ jobs:
145145
- name: vibe-dashboard
146146
node-version: 24
147147
command: |
148-
npx playwright install chromium
149148
# FIXME: Failed to load JS plugin: ./plugins/debugger.js
150149
# vp run ready
151150
vp fmt
@@ -216,7 +215,6 @@ jobs:
216215
- name: vitepress
217216
node-version: 24
218217
command: |
219-
npx playwright install chromium
220218
vp run format
221219
vp run build
222220
vp test run -r __tests__/unit
@@ -226,7 +224,6 @@ jobs:
226224
- name: tanstack-start-helloworld
227225
node-version: 24
228226
command: |
229-
npx playwright install chromium
230227
vp run test
231228
vp run build
232229
- name: oxlint-plugin-complexity
@@ -241,7 +238,6 @@ jobs:
241238
- name: vite-vue-vercel
242239
node-version: 24
243240
command: |
244-
npx playwright install chromium
245241
vp run test
246242
vp run build
247243
- name: dify
@@ -314,7 +310,6 @@ jobs:
314310
- name: vitest-playwright-repro
315311
node-version: 24
316312
command: |
317-
npx playwright install chromium
318313
vp test
319314
- name: vite-plus-vitest-type-aug
320315
node-version: 24
@@ -410,6 +405,19 @@ jobs:
410405
shell: bash
411406
run: node $GITHUB_WORKSPACE/ecosystem-ci/verify-install.ts
412407

408+
- name: Determine playwright requirement
409+
id: pw
410+
shell: bash
411+
run: |
412+
needs=$(jq -r --arg p '${{ matrix.project.name }}' '.[$p].playwright // false' "$GITHUB_WORKSPACE/ecosystem-ci/repo.json")
413+
echo "needs=$needs" >> "$GITHUB_OUTPUT"
414+
415+
- name: Install Playwright chromium
416+
if: steps.pw.outputs.needs == 'true'
417+
working-directory: ${{ runner.temp }}/vite-plus-ecosystem-ci/${{ matrix.project.name }}${{ matrix.project.directory && format('/{0}', matrix.project.directory) || '' }}
418+
shell: bash
419+
run: npx playwright install chromium
420+
413421
- name: Run vite-plus commands in ${{ matrix.project.name }}
414422
working-directory: ${{ runner.temp }}/vite-plus-ecosystem-ci/${{ matrix.project.name }}${{ matrix.project.directory && format('/{0}', matrix.project.directory) || '' }}
415423
run: ${{ matrix.project.command }}

ecosystem-ci/patch-project.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ const cwd = directory ? join(repoRoot, directory) : repoRoot;
2424
// run vp migrate
2525
const cli = process.env.VP_CLI_BIN ?? 'vp';
2626

27+
// Projects that need Playwright (declared via `playwright: true` in repo.json)
28+
// must use Playwright >= 1.60.0, otherwise `npx playwright install chromium`
29+
// wedges after the download bar reaches 100% under Node 24.16.0+
30+
// (microsoft/playwright#40724, fixed in 1.60.0 via microsoft/playwright#40747).
31+
// Force the version uniformly via pnpm overrides so it covers direct deps,
32+
// catalog entries, and transitive-only (e.g. @vitest/browser-playwright) cases.
33+
const needsPlaywright = 'playwright' in repoConfig && repoConfig.playwright;
34+
if (needsPlaywright) {
35+
const pkgPath = join(cwd, 'package.json');
36+
const pkg = JSON.parse(await readFile(pkgPath, 'utf-8'));
37+
pkg.pnpm ??= {};
38+
pkg.pnpm.overrides ??= {};
39+
pkg.pnpm.overrides.playwright = '^1.60.0';
40+
await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8');
41+
}
42+
2743
if (project === 'rollipop') {
2844
const oxfmtrc = await readFile(join(repoRoot, '.oxfmtrc.json'), 'utf-8');
2945
await writeFile(

ecosystem-ci/repo.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"repository": "https://github.com/voidzero-dev/vibe-dashboard.git",
1515
"branch": "main",
1616
"hash": "158e4a0c3d8a1801e330300a5deba4506fd5dfb9",
17-
"forceFreshMigration": true
17+
"forceFreshMigration": true,
18+
"playwright": true
1819
},
1920
"rollipop": {
2021
"repository": "https://github.com/leegeunhyeok/rollipop.git",
@@ -39,12 +40,14 @@
3940
"vitepress": {
4041
"repository": "https://github.com/vuejs/vitepress.git",
4142
"branch": "feat/vite-8",
42-
"hash": "9330f228861623c71f2598271d4e79c9c53f2c08"
43+
"hash": "9330f228861623c71f2598271d4e79c9c53f2c08",
44+
"playwright": true
4345
},
4446
"tanstack-start-helloworld": {
4547
"repository": "https://github.com/fengmk2/tanstack-start-helloworld.git",
4648
"branch": "main",
47-
"hash": "09bafe177bbcd1e3108c441a67601ae6380ad352"
49+
"hash": "09bafe177bbcd1e3108c441a67601ae6380ad352",
50+
"playwright": true
4851
},
4952
"oxlint-plugin-complexity": {
5053
"repository": "https://github.com/itaymendel/oxlint-plugin-complexity.git",
@@ -54,7 +57,8 @@
5457
"vite-vue-vercel": {
5558
"repository": "https://github.com/fengmk2/vite-vue-vercel.git",
5659
"branch": "main",
57-
"hash": "f2bf9fc40880c6a80f5d89bff70641c2eeaf77ef"
60+
"hash": "f2bf9fc40880c6a80f5d89bff70641c2eeaf77ef",
61+
"playwright": true
5862
},
5963
"viteplus-ws-repro": {
6064
"repository": "https://github.com/Charles5277/viteplus-ws-repro.git",
@@ -112,7 +116,8 @@
112116
"vitest-playwright-repro": {
113117
"repository": "https://github.com/why-reproductions-are-required/vitest-playwright-repro.git",
114118
"branch": "main",
115-
"hash": "f7252170025c01ec482fa9ad43e09b965f46928f"
119+
"hash": "f7252170025c01ec482fa9ad43e09b965f46928f",
120+
"playwright": true
116121
},
117122
"vite-plus-vitest-type-aug": {
118123
"repository": "https://github.com/why-reproductions-are-required/vite-plus-vitest-type-aug.git",

0 commit comments

Comments
 (0)