Skip to content

Commit 0a59301

Browse files
committed
ci: fix extension activation in tests (build dist) and add Xvfb for linux
1 parent b93a5bf commit 0a59301

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ jobs:
3535

3636
- name: Compile TypeScript
3737
run: npm run compile
38+
- name: Setup virtual display (Linux only)
39+
if: matrix.os == 'ubuntu-latest'
40+
run: sudo apt-get update && sudo apt-get install -y xvfb
3841
- name: Run tests
39-
run: npm test
42+
run: |
43+
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
44+
xvfb-run --auto-servernum --server-args='-screen 0 1280x1024x24' npm test;
45+
else
46+
npm test;
47+
fi
4048
env:
4149
CI: true
4250

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@
412412
"build:dist": "node esbuild.js --production",
413413
"package": "npm run build:dist",
414414
"compile-tests": "tsc -p ./",
415-
"pretest": "npm run lint && npm run compile-tests",
415+
"pretest": "npm run lint && npm run compile-tests && npm run build:dist",
416416
"lint": "eslint",
417417
"test": "node -e \"try{require('fs').rmSync('./.vscode-test/user-data/DIP',{recursive:true,force:true});}catch(e){}\" && npx vscode-test",
418418
"test:coverage": "npm run compile-tests && npx vscode-test --coverage"

0 commit comments

Comments
 (0)