Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

Adds a GitHub Actions workflow and integration tests for the Playwright MCP server running through the AWF firewall.

Changes

  • New workflow (.github/workflows/test-playwright.yml): Runs Playwright MCP integration tests on push/PR to main
  • Integration tests (tests/integration/playwright-mcp.test.ts): Validates MCP config writing, image pull through firewall, container startup, and github.com accessibility

MCP Configuration

{
  "mcpServers": {
    "playwright": {
      "type": "local",
      "command": "docker",
      "args": ["run", "-i", "--rm", "--init", "mcr.microsoft.com/playwright/mcp", 
               "--output-dir", "/tmp/gh-aw/mcp-logs/playwright",
               "--allowed-hosts", "localhost;localhost:*;127.0.0.1;127.0.0.1:*;github.com"],
      "tools": ["*"]
    }
  }
}

Test Coverage

  1. MCP configuration can be written and validated
  2. Docker can pull Playwright MCP image through firewall
  3. Playwright MCP container starts and responds
  4. github.com accessible through firewall
  5. MCP config format validation
Original prompt

create a copilot workflow that starts playwright

"playwright": {
"type": "local",
"command": "docker",
"args": ["run", "-i", "--rm", "--init", "mcr.microsoft.com/playwright/mcp", "--output-dir", "/tmp/gh-aw/mcp-logs/playwright", "--allowed-hosts", "localhost;localhost:;127.0.0.1;127.0.0.1:;github.com"],
"tools": ["*"]
}

the prompt could be as simple as "Use playwright to navigate to https://github.com and verify the page title contains "GitHub""


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@Mossaka Mossaka marked this pull request as ready for review November 27, 2025 00:27
@github-actions
Copy link

Test Coverage Report

Metric Coverage Covered/Total
Lines 49.19% 274/557
Statements 48.94% 279/570
Functions 54.83% 34/62
Branches 40.57% 71/175
Coverage Thresholds

The project has the following coverage thresholds configured:

  • Lines: 38%
  • Statements: 38%
  • Functions: 35%
  • Branches: 30%

Coverage report generated by `npm run test:coverage`

Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
@Mossaka Mossaka force-pushed the copilot/create-playwright-workflow branch from a1d785d to 52af01f Compare November 27, 2025 00:30
Copilot AI changed the title [WIP] Add Copilot workflow to start Playwright feat: add playwright mcp integration tests and workflow Nov 27, 2025
Copilot AI requested a review from Mossaka November 27, 2025 00:32
Copilot finished work on behalf of Mossaka November 27, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants