Skip to content

Commit 454b86f

Browse files
committed
chore: bypass X server issue
1 parent 41b0f80 commit 454b86f

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

.github/workflows/test.yaml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,48 @@ on:
22
pull_request:
33
branches:
44
- master
5-
5+
66
name: Test extension
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10+
container: mcr.microsoft.com/vscode/devcontainers/typescript-node:latest
11+
1012
steps:
1113
- uses: actions/checkout@v2
1214
- run: npm install
1315

14-
- name: Run tests
15-
run: npm test
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 23
20+
21+
- name: Install dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y \
25+
libnss3 \
26+
libx11-xcb1 \
27+
libxcomposite1 \
28+
libxcursor1 \
29+
libxdamage1 \
30+
libxfixes3 \
31+
libxi6 \
32+
libxrandr2 \
33+
libxtst6 \
34+
mesa-utils \
35+
x11-utils \
36+
xserver-xorg-core \
37+
xserver-xorg-video-dummy \
38+
xvfb
39+
40+
- name: Install npm dependencies
41+
run: npm install
42+
43+
- name: Run Code
44+
run: |
45+
export LIBGL_ALWAYS_SOFTWARE=1
46+
export MESA_LOADER_DRIVER_OVERRIDE=llvmpipe
47+
export ELECTRON_DISABLE_GPU=1
48+
export ELECTRON_OZONE_PLATFORM_HINT=x11
49+
xvfb-run --auto-servernum npm test

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@
163163
"glob": "^7.1.6",
164164
"mocha": "^11.1.0",
165165
"ts-node": "^10.9.2",
166-
"typescript": "^4.9.5",
167-
"vscode-test": "^1.5.0"
166+
"typescript": "^4.9.5"
168167
},
169168
"repository": {
170169
"url": "https://github.com/aquasecurity/trivy-vscode-extension"

0 commit comments

Comments
 (0)