Skip to content

Commit ba2e0af

Browse files
committed
test: add Playwright loopback smoke workflows
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ba940bd-5aa8-4dd2-9c34-fc4c991fe355
1 parent 037c1fc commit ba2e0af

11 files changed

Lines changed: 7155 additions & 49 deletions

.github/workflows/smoke-playwright-cloud-hypervisor.lock.yml

Lines changed: 1633 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
description: Smoke test Playwright CLI loopback access in the Cloud Hypervisor runtime
3+
on:
4+
workflow_dispatch:
5+
label_command:
6+
name: test-playwright-cloud-hypervisor
7+
events: [pull_request]
8+
remove_label: false
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
issues: read
13+
copilot-requests: write
14+
concurrency:
15+
job-discriminator: ${{ github.run_id }}
16+
env:
17+
NPM_CONFIG_REGISTRY: https://packagefeedproxy.microsoft.io/npm/
18+
name: Smoke Playwright Cloud Hypervisor
19+
engine:
20+
id: copilot
21+
version: 1.0.34
22+
network:
23+
allowed:
24+
- cdn.playwright.dev
25+
- playwright.download.prss.microsoft.com
26+
- packagefeedproxy.microsoft.io
27+
- "*.pkgs.visualstudio.com"
28+
blocked:
29+
- node
30+
steps:
31+
- name: Install Playwright CLI from Microsoft registry
32+
run: |
33+
test "$(npm view @playwright/cli@0.1.18 version --registry="$NPM_CONFIG_REGISTRY")" = "0.1.18"
34+
npm install -g @playwright/cli@0.1.18 --registry="$NPM_CONFIG_REGISTRY"
35+
timeout-minutes: 10
36+
tools:
37+
bash:
38+
- "*"
39+
safe-outputs:
40+
threat-detection:
41+
enabled: false
42+
add-comment:
43+
hide-older-comments: true
44+
timeout-minutes: 30
45+
sandbox:
46+
agent:
47+
id: awf
48+
version: v0.28.1
49+
runtime: cloud-hypervisor
50+
strict: false
51+
post-steps:
52+
- name: Validate Playwright loopback result
53+
run: node scripts/ci/validate-playwright-loopback-smoke.js cloud-hypervisor
54+
---
55+
56+
# Smoke Test: Playwright CLI Loopback on Cloud Hypervisor
57+
58+
Run `bash scripts/ci/run-playwright-loopback-smoke.sh cloud-hypervisor` exactly once. This starts
59+
a server and Playwright browser inside the agent sandbox, verifies JavaScript
60+
rendering over loopback, and verifies browser egress to a non-allowlisted domain
61+
is blocked.
62+
63+
Read `/tmp/gh-aw/agent/playwright-loopback-results.json` and report the observed
64+
results. On a pull request trigger, call `add_comment` with
65+
`item_number: ${{ github.event.pull_request.number }}`. On `workflow_dispatch`,
66+
call `noop`. Include this exact marker when successful:
67+
68+
`PLAYWRIGHT_LOOPBACK_RESULT runtime=cloud-hypervisor loopback=pass javascript_title=pass blocked_egress=pass`

.github/workflows/smoke-playwright-docker-sbx.lock.yml

Lines changed: 1731 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
description: Smoke test Playwright CLI loopback access in the Docker sbx runtime
3+
on:
4+
workflow_dispatch:
5+
label_command:
6+
name: test-playwright-docker-sbx
7+
events: [pull_request]
8+
remove_label: false
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
issues: read
13+
copilot-requests: write
14+
concurrency:
15+
job-discriminator: ${{ github.run_id }}
16+
env:
17+
NPM_CONFIG_REGISTRY: https://packagefeedproxy.microsoft.io/npm/
18+
name: Smoke Playwright Docker Sbx
19+
engine:
20+
id: copilot
21+
version: 1.0.34
22+
network:
23+
allowed:
24+
- cdn.playwright.dev
25+
- playwright.download.prss.microsoft.com
26+
- packagefeedproxy.microsoft.io
27+
- "*.pkgs.visualstudio.com"
28+
blocked:
29+
- node
30+
steps:
31+
- name: Install Playwright CLI from Microsoft registry
32+
run: |
33+
test "$(npm view @playwright/cli@0.1.18 version --registry="$NPM_CONFIG_REGISTRY")" = "0.1.18"
34+
npm install -g @playwright/cli@0.1.18 --registry="$NPM_CONFIG_REGISTRY"
35+
timeout-minutes: 10
36+
tools:
37+
bash:
38+
- "*"
39+
safe-outputs:
40+
threat-detection:
41+
enabled: false
42+
add-comment:
43+
hide-older-comments: true
44+
timeout-minutes: 30
45+
sandbox:
46+
agent:
47+
id: awf
48+
runtime: docker-sbx
49+
strict: false
50+
post-steps:
51+
- name: Validate Playwright loopback result
52+
run: node scripts/ci/validate-playwright-loopback-smoke.js docker-sbx
53+
---
54+
55+
# Smoke Test: Playwright CLI Loopback on Docker sbx
56+
57+
Run `bash scripts/ci/run-playwright-loopback-smoke.sh docker-sbx` exactly once. This starts
58+
a server and Playwright browser inside the agent sandbox, verifies JavaScript
59+
rendering over loopback, and verifies browser egress to a non-allowlisted domain
60+
is blocked.
61+
62+
Read `/tmp/gh-aw/agent/playwright-loopback-results.json` and report the observed
63+
results. On a pull request trigger, call `add_comment` with
64+
`item_number: ${{ github.event.pull_request.number }}`. On `workflow_dispatch`,
65+
call `noop`. Include this exact marker when successful:
66+
67+
`PLAYWRIGHT_LOOPBACK_RESULT runtime=docker-sbx loopback=pass javascript_title=pass blocked_egress=pass`

.github/workflows/smoke-playwright-gvisor.lock.yml

Lines changed: 1632 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
description: Smoke test Playwright CLI loopback access in the gVisor runtime
3+
on:
4+
workflow_dispatch:
5+
label_command:
6+
name: test-playwright-gvisor
7+
events: [pull_request]
8+
remove_label: false
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
issues: read
13+
copilot-requests: write
14+
concurrency:
15+
job-discriminator: ${{ github.run_id }}
16+
env:
17+
NPM_CONFIG_REGISTRY: https://packagefeedproxy.microsoft.io/npm/
18+
name: Smoke Playwright gVisor
19+
engine:
20+
id: copilot
21+
version: 1.0.34
22+
network:
23+
allowed:
24+
- cdn.playwright.dev
25+
- playwright.download.prss.microsoft.com
26+
- packagefeedproxy.microsoft.io
27+
- "*.pkgs.visualstudio.com"
28+
blocked:
29+
- node
30+
steps:
31+
- name: Install Playwright CLI from Microsoft registry
32+
run: |
33+
test "$(npm view @playwright/cli@0.1.18 version --registry="$NPM_CONFIG_REGISTRY")" = "0.1.18"
34+
npm install -g @playwright/cli@0.1.18 --registry="$NPM_CONFIG_REGISTRY"
35+
timeout-minutes: 10
36+
tools:
37+
bash:
38+
- "*"
39+
safe-outputs:
40+
threat-detection:
41+
enabled: false
42+
add-comment:
43+
hide-older-comments: true
44+
timeout-minutes: 20
45+
sandbox:
46+
agent:
47+
id: awf
48+
runtime: gvisor
49+
strict: false
50+
post-steps:
51+
- name: Validate Playwright loopback result
52+
run: node scripts/ci/validate-playwright-loopback-smoke.js gvisor
53+
---
54+
55+
# Smoke Test: Playwright CLI Loopback on gVisor
56+
57+
Run `bash scripts/ci/run-playwright-loopback-smoke.sh gvisor` exactly once. This starts
58+
a server and Playwright browser inside the agent sandbox, verifies JavaScript
59+
rendering over loopback, and verifies browser egress to a non-allowlisted domain
60+
is blocked.
61+
62+
Read `/tmp/gh-aw/agent/playwright-loopback-results.json` and report the observed
63+
results. On a pull request trigger, call `add_comment` with
64+
`item_number: ${{ github.event.pull_request.number }}`. On `workflow_dispatch`,
65+
call `noop`. Include this exact marker when successful:
66+
67+
`PLAYWRIGHT_LOOPBACK_RESULT runtime=gvisor loopback=pass javascript_title=pass blocked_egress=pass`

0 commit comments

Comments
 (0)