Skip to content

Commit 9ea03ae

Browse files
committed
ci: fix display issue
1 parent ab10dee commit 9ea03ae

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,24 @@ jobs:
2424
- name: Install dependencies
2525
run: npm ci
2626

27+
- name: Install xvfb and setup display
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y xvfb
31+
export DISPLAY=:99
32+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
33+
sleep 5
34+
echo "Display setup complete"
35+
36+
- name: Verify display is working
37+
run: |
38+
export DISPLAY=:99
39+
xdpyinfo > /dev/null 2>&1 && echo "Display is working" || echo "Display not working"
40+
2741
- name: Run tests
2842
run: npm test
43+
env:
44+
DISPLAY: ':99'
2945

3046
- name: Check for linting errors
3147
run: npm run lint || echo "No lint script found, skipping lint check"

.vscode-test.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@ import { defineConfig } from '@vscode/test-cli';
22

33
export default defineConfig({
44
files: 'test/**/*.test.js',
5+
launchArgs: [
6+
'--disable-gpu',
7+
'--disable-software-rasterizer',
8+
'--disable-dev-shm-usage',
9+
'--no-sandbox',
10+
'--disable-setuid-sandbox',
11+
'--disable-web-security',
12+
'--disable-features=VizDisplayCompositor'
13+
],
14+
extensionDevelopmentPath: '.',
15+
extensionTestsPath: './test'
516
});

0 commit comments

Comments
 (0)