-
Notifications
You must be signed in to change notification settings - Fork 272
136 lines (130 loc) · 5.66 KB
/
Copy pathvisual-regression.yml
File metadata and controls
136 lines (130 loc) · 5.66 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
127
128
129
130
131
132
133
134
135
136
name: Visual Regression
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
paths:
- "apps/vscode-e2e/package.json"
- "apps/vscode-e2e/src/theme-fixtures/**"
- "apps/vscode-e2e/src/visual/**"
- "apps/vscode-e2e/playwright-electron.config.ts"
- "packages/types/src/api.ts"
- "packages/types/src/vscode-extension-host.ts"
- "src/core/webview/ClineProvider.ts"
- "src/core/webview/webviewMessageHandler.ts"
- "src/extension/api.ts"
- "webview-ui/**"
- "src/shared/**"
- "package.json"
- "pnpm-lock.yaml"
- ".github/workflows/visual-regression.yml"
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.62.1-noble@sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e
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@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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
timeout-minutes: 20
container:
image: mcr.microsoft.com/playwright:v1.62.1-noble@sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: extension-host-visual-regression
path: |
apps/vscode-e2e/playwright-report-electron
apps/vscode-e2e/test-results-electron
if-no-files-found: ignore