chore: fix tests on linux (#1404)

This commit is contained in:
Yury Semikhatsky
2026-02-14 13:11:47 -08:00
committed by GitHub
parent bd1428d5b4
commit 8c4b1aaa25
4 changed files with 7 additions and 3 deletions

View File

@@ -6,6 +6,10 @@ on:
pull_request:
branches: [ main ]
env:
PWMCP_DEBUG: '1'
PWDEBUGIMPL: '1'
jobs:
lint:
runs-on: ubuntu-latest

View File

@@ -64,4 +64,4 @@ COPY --from=browser --chown=${USERNAME}:${USERNAME} ${PLAYWRIGHT_BROWSERS_PATH}
COPY --chown=${USERNAME}:${USERNAME} packages/playwright-mcp/cli.js packages/playwright-mcp/package.json ./
# Run in headless and only with chromium (other browsers need more dependencies not included in this image)
ENTRYPOINT ["node", "cli.js", "--headless", "--browser", "chromium", "--no-sandbox"]
ENTRYPOINT ["node", "cli.js", "--headless", "--browser", "chromium", "--no-chromium-sandbox"]

View File

@@ -731,7 +731,7 @@ docker run -d -i --rm --init --pull=always \
--name playwright \
-p 8931:8931 \
mcr.microsoft.com/playwright/mcp \
cli.js --headless --browser chromium --no-sandbox --port 8931
cli.js --headless --browser chromium --no-chromium-sandbox --port 8931
```
The server will listen on host port **8931** and can be reached by any MCP client.

View File

@@ -80,7 +80,7 @@ export const test = baseTest.extend<TestFixtures & TestOptions, WorkerFixtures>(
await use(async options => {
const args: string[] = mcpArgs ?? [];
if (process.env.CI && process.platform === 'linux')
args.push('--no-sandbox');
args.push('--no-chromium-sandbox');
if (mcpHeadless)
args.push('--headless');
if (mcpBrowser)