Skip to content

Commit 385683b

Browse files
committed
feat: add UI tests to CI
1 parent 9c9a686 commit 385683b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,42 @@ jobs:
8787
# Allow insiders to fail (may have breaking changes)
8888
continue-on-error: ${{ matrix.vscode-version == 'insiders' }}
8989

90+
ui-tests:
91+
name: UI Tests (${{ matrix.os }})
92+
runs-on: ${{ matrix.os }}
93+
strategy:
94+
fail-fast: false
95+
matrix:
96+
os: [ubuntu-latest, macos-latest, windows-latest]
97+
steps:
98+
- name: Checkout repository
99+
uses: actions/checkout@v4
100+
with:
101+
persist-credentials: false
102+
103+
- name: Setup Node.js
104+
uses: actions/setup-node@v4
105+
with:
106+
node-version: 20
107+
cache: "npm"
108+
109+
- name: Install dependencies
110+
run: npm ci
111+
112+
- name: Compile extension
113+
run: npm run compile
114+
115+
# Linux requires a virtual display for VS Code / ChromeDriver
116+
- name: Run UI tests (Linux)
117+
if: runner.os == 'Linux'
118+
run: xvfb-run -a npm run test:ui
119+
env:
120+
DISPLAY: ":99"
121+
122+
- name: Run UI tests (macOS/Windows)
123+
if: runner.os != 'Linux'
124+
run: npm run test:ui
125+
90126
build:
91127
name: Build Extension
92128
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)