Repository navigation
126 lines (120 loc) · 5.43 KB
/
Copy pathvisual-regression.yml
File metadata and controls
126 lines (120 loc) · 5.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Visual Regression
on:
workflow_dispatch:
# No `paths` filter: this workflow backs the required `webview-visual`
# check. GitHub keeps path-filtered workflows "pending" on pull requests
# that do not match the filter, which blocks merging for a required check.
# The merge_group event ignores path filters, so the queue is unaffected.
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
webview-visual:
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: mcr.microsoft.com/playwright:v1.64.1-noble@sha256:47b510dd9230bf0b9bfc9b20102241e577ea7a99334ab4c3ca19f19770e9b8ea
options: --ipc=host
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
install-args: "--frozen-lockfile"
- name: Run webview visual tests
run: pnpm --filter @roo-code/vscode-webview test:visual
- name: Upload visual test coverage to Codecov
if: always()
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
files: webview-ui/coverage-ct/lcov.info
disable_search: true
flags: webview-ui-ct
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload visual test artifacts
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: webview-visual-regression
path: |
webview-ui/playwright-report
webview-ui/test-results
if-no-files-found: ignore
theme-fixtures:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
install-args: "--frozen-lockfile"
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Get pinned VS Code version
id: vscode-version
run: |
VERSION=$(node -p 'require("./apps/vscode-e2e/package.json").devDependencies["@types/vscode"]')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Cache pinned VS Code
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: apps/vscode-e2e/.vscode-test/
key: vscode-theme-fixtures-${{ runner.os }}-${{ steps.vscode-version.outputs.version }}-v1
- name: Test theme fixture serialization
run: pnpm --filter @roo-code/vscode-e2e themes:test
- name: Check generated VS Code theme fixtures
run: xvfb-run -a pnpm --filter @roo-code/vscode-e2e themes:check
extension-host-visual:
runs-on: ubuntu-latest
# Includes dependency setup, builds, repeated visuals, and production watchdog waits.
timeout-minutes: 35
container:
image: mcr.microsoft.com/playwright:v1.64.1-noble@sha256:47b510dd9230bf0b9bfc9b20102241e577ea7a99334ab4c3ca19f19770e9b8ea
options: --ipc=host
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
TZ: UTC
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
install-args: "--frozen-lockfile"
- name: Get pinned VS Code version
id: vscode-version
run: |
VERSION=$(node -p 'require("./apps/vscode-e2e/package.json").devDependencies["@types/vscode"]')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Cache pinned VS Code
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: apps/vscode-e2e/.vscode-test/
key: vscode-electron-visual-${{ runner.os }}-${{ steps.vscode-version.outputs.version }}-v1
- name: Run Extension Host visual tests
run: xvfb-run -a pnpm --filter @roo-code/vscode-e2e test:visual:electron
- name: Upload Extension Host visual artifacts
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: extension-host-visual-regression
path: |
apps/vscode-e2e/playwright-report-electron
apps/vscode-e2e/test-results-electron
if-no-files-found: ignore