From a1c06eff21be6f7d5b0b38d85d60e518e00d520c Mon Sep 17 00:00:00 2001 From: sadiq khan Date: Tue, 26 May 2026 12:57:55 +0530 Subject: [PATCH 1/2] ci: install playwright browsers via @playwright/mcp's bundled version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous run failed all browser tool calls with "Browser chrome-for-testing is not installed" — caused by a version drift between `npx playwright install` (whatever's latest on npm) and `npx -y @playwright/mcp@latest` (whatever playwright that package bundles). Pinning the install to use @playwright/mcp's playwright guarantees the cache path matches. Also adding `chromium-headless-shell`: Playwright 1.49 split the headless build into a separate binary, and the MCP config runs with `--headless`, so it needs the shell binary specifically. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/claude-pr-test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude-pr-test.yml b/.github/workflows/claude-pr-test.yml index 4a8dc4a..62749f8 100644 --- a/.github/workflows/claude-pr-test.yml +++ b/.github/workflows/claude-pr-test.yml @@ -53,8 +53,12 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Playwright Chromium - run: npx --yes playwright install --with-deps chromium + - name: Install Playwright browsers (matching @playwright/mcp) + # Use the playwright version that @playwright/mcp ships with so the + # browser cache path matches what the MCP server expects at runtime. + # Also install chromium-headless-shell because the MCP config runs + # with --headless, which newer Playwright (1.49+) split out. + run: npx --yes -p @playwright/mcp@latest playwright install --with-deps chromium chromium-headless-shell - name: Write PR diff for the skill env: From 64e8d7cbc44059909de6c8e960abfde6da0131f4 Mon Sep 17 00:00:00 2001 From: sadiq khan Date: Tue, 26 May 2026 12:59:29 +0530 Subject: [PATCH 2/2] ci: install chrome-for-testing via @playwright/mcp's own installer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the previous attempt — `playwright install ... chromium` installs the standard Chromium build, but @playwright/mcp insists on Google's `chrome-for-testing` build instead. The previous run's error explicitly told us the correct command: `npx @playwright/mcp install-browser chrome-for-testing` We still need `playwright install-deps` to bring in the OS-level libraries (nss, atk, ...) that any chromium-derived binary needs on ubuntu-latest. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/claude-pr-test.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/claude-pr-test.yml b/.github/workflows/claude-pr-test.yml index 62749f8..6708e21 100644 --- a/.github/workflows/claude-pr-test.yml +++ b/.github/workflows/claude-pr-test.yml @@ -53,12 +53,16 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Playwright browsers (matching @playwright/mcp) - # Use the playwright version that @playwright/mcp ships with so the - # browser cache path matches what the MCP server expects at runtime. - # Also install chromium-headless-shell because the MCP config runs - # with --headless, which newer Playwright (1.49+) split out. - run: npx --yes -p @playwright/mcp@latest playwright install --with-deps chromium chromium-headless-shell + - name: Install Playwright system deps + # The Playwright bundle handles the browser binary itself, but the + # OS-level deps (libnss3, libatk, etc.) still need installing. + run: npx --yes playwright install-deps chromium + - name: Install chrome-for-testing for @playwright/mcp + # @playwright/mcp uses Google's chrome-for-testing build (not the + # vanilla `playwright install chromium` binary) and ships its own + # installer to fetch it. The error message in the previous run + # literally tells us this command — it's the canonical one. + run: npx --yes @playwright/mcp@latest install-browser chrome-for-testing - name: Write PR diff for the skill env: