mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2026-03-16 22:33:10 +00:00
chore: fix tests on linux (#1404)
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -6,6 +6,10 @@ on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
PWMCP_DEBUG: '1'
|
||||
PWDEBUGIMPL: '1'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user