From 4d79642bceaf54f5530972c7a562708011b6a1b1 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 20 Oct 2026 09:38:15 +0200 Subject: [PATCH] ci: Run the Playwright install's npx outside the repo From the repo root, npx could pick up a hoisted playwright that a parallel pnpm install was still linking, and fail with "playwright: not found". Also pass the browsers to install-deps as separate arguments. Co-Authored-By: Claude Opus 5.5 --- .github/actions/install-playwright/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/install-playwright/action.yml b/.github/actions/install-playwright/action.yml index 30815292dea2..ca6c8a2d9583 100644 --- a/.github/actions/install-playwright/action.yml +++ b/.github/actions/install-playwright/action.yml @@ -37,20 +37,23 @@ runs: key: playwright-${{ runner.os }}-iteration-1-${{ steps.playwright-version.outputs.version }} # We always install all browsers, if uncached + # `npx` runs outside the repo, so it can't pick up a `playwright` that a parallel `pnpm install` is still linking. - name: Install Playwright dependencies (uncached) env: PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.version }} run: npx -y "playwright@$PLAYWRIGHT_VERSION" install chromium webkit firefox --with-deps if: steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit != 'true' shell: bash + working-directory: ${{ runner.temp }} - name: Install Playwright system dependencies only (cached) env: PLAYWRIGHT_BROWSERS: ${{ inputs.browsers || 'chromium webkit firefox' }} PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.version }} - run: npx -y "playwright@$PLAYWRIGHT_VERSION" install-deps "$PLAYWRIGHT_BROWSERS" + run: npx -y "playwright@$PLAYWRIGHT_VERSION" install-deps $PLAYWRIGHT_BROWSERS if: steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit == 'true' shell: bash + working-directory: ${{ runner.temp }} # Only store cache on develop branch - name: Store cached playwright binaries