Skip to content

Commit a24b7c5

Browse files
authored
ci: run session viewer browser fixtures (#398)
Fixes #387. Coven-Harness: codex / gpt-6
1 parent 0f7ae71 commit a24b7c5

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

‎.github/workflows/viewer-tests.yml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Session viewer browser tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'session/**'
7+
- 'scripts/test_viewer_*.py'
8+
- 'src-rust/crates/core/src/share_export/**'
9+
- '.github/workflows/viewer-tests.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
viewer:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
steps:
20+
- uses: actions/checkout@v5
21+
with:
22+
persist-credentials: false
23+
- uses: actions/setup-node@v6
24+
with:
25+
node-version: '24'
26+
package-manager-cache: false
27+
- name: Install pinned browser tooling
28+
shell: bash
29+
run: |
30+
npm install --prefix "$RUNNER_TEMP/viewer-tools" --no-save @playwright/cli@0.1.22
31+
"$RUNNER_TEMP/viewer-tools/node_modules/.bin/playwright" install --with-deps chromium
32+
cat > "$RUNNER_TEMP/viewer-browser.json" <<'JSON'
33+
{"browser":{"browserName":"chromium","launchOptions":{"channel":"chromium","headless":true}}}
34+
JSON
35+
- name: Run offline viewer fixtures
36+
shell: bash
37+
env:
38+
PLAYWRIGHT_MCP_CONFIG: ${{ runner.temp }}/viewer-browser.json
39+
run: |
40+
for fixture in scripts/test_viewer_*.py; do
41+
python3 -B "$fixture" --cli "$RUNNER_TEMP/viewer-tools/node_modules/.bin/playwright-cli"
42+
done

0 commit comments

Comments
 (0)