ci: run playwright install in the package context
playwright is a direct devDep of @robonen/primitives and @robonen/editor, not the root, so 'pnpm exec playwright' couldn't resolve the CLI in CI's strict install (Command "playwright" not found). Run it via 'pnpm --filter <pkg> exec' so the package's node_modules/.bin is on PATH.
This commit is contained in:
@@ -73,10 +73,12 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter "${{ matrix.package }}..." --if-present run build
|
run: pnpm --filter "${{ matrix.package }}..." --if-present run build
|
||||||
|
|
||||||
# Only the browser-mode test suites (vitest `instances: chromium`) need a browser.
|
# Only the browser-mode test suites (vitest `instances: chromium`) need a
|
||||||
|
# browser. playwright is a direct devDep of these packages, so run its CLI
|
||||||
|
# in the package context (--filter) — it isn't resolvable from the root.
|
||||||
- name: Install Playwright Chromium
|
- name: Install Playwright Chromium
|
||||||
if: matrix.package == '@robonen/primitives' || matrix.package == '@robonen/editor'
|
if: matrix.package == '@robonen/primitives' || matrix.package == '@robonen/editor'
|
||||||
run: pnpm exec playwright install --with-deps chromium
|
run: pnpm --filter "${{ matrix.package }}" exec playwright install --with-deps chromium
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm --filter "${{ matrix.package }}" --if-present run lint:check
|
run: pnpm --filter "${{ matrix.package }}" --if-present run lint:check
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Install Playwright browser
|
- name: Install Playwright browser
|
||||||
run: pnpm exec playwright install --with-deps chromium
|
run: pnpm --filter "@robonen/primitives" exec playwright install --with-deps chromium
|
||||||
|
|
||||||
- name: Build & Test
|
- name: Build & Test
|
||||||
run: pnpm build && pnpm test
|
run: pnpm build && pnpm test
|
||||||
|
|||||||
Reference in New Issue
Block a user