File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,8 +118,16 @@ jobs:
118118 working-directory : editors/code
119119 run : pnpm install
120120
121- - name : Run Tests
121+ - name : Run tests (Linux)
122122 working-directory : editors/code
123+ if : runner.os == 'Linux'
124+ run : |
125+ sudo apt-get install -y xvfb
126+ pnpm run test:ci
127+
128+ - name : Run Tests (Osx/Windows)
129+ working-directory : editors/code
130+ if : runner.os != 'Linux'
123131 run : pnpm run test
124132
125133 - name : Build VS Code extension
Original file line number Diff line number Diff line change 117117 "pretest" : " pnpm run compile && pnpm run lint" ,
118118 "lint" : " eslint src --ext ts" ,
119119 "test" : " node ./out/test/runTest.js" ,
120+ "test:ci" : " xvfb-run -a node ./out/test/runTest.js" ,
120121 "vscode:prepublish" : " pnpm run esbuild-base --minify" ,
121122 "esbuild-base" : " esbuild ./src/extension.ts ./src/debugAdapter.ts --bundle --outdir=out --external:vscode --format=cjs --platform=node" ,
122123 "esbuild" : " pnpm run esbuild-base --sourcemap" ,
Original file line number Diff line number Diff line change @@ -12,8 +12,19 @@ async function main() {
1212 // Passed to --extensionTestsPath
1313 const extensionTestsPath = path . resolve ( __dirname , './suite/index' ) ;
1414
15+ const launchArgs = [
16+ '--disable-gpu' ,
17+ '--disable-dev-shm-usage' ,
18+ '--disable-extensions' ,
19+ '--no-sandbox'
20+ ]
21+
1522 // Download VS Code, unzip it and run the integration test
16- await runTests ( { extensionDevelopmentPath, extensionTestsPath } ) ;
23+ await runTests ( {
24+ extensionDevelopmentPath,
25+ extensionTestsPath,
26+ launchArgs
27+ } ) ;
1728 } catch ( err ) {
1829 console . error ( 'Failed to run tests' , err ) ;
1930 process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments