File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 6060
6161 - name : Copilot Setup - Install CodeQL packs used in integration tests
6262 run : ./server/scripts/install-packs.sh
63+
64+ # VS Code extension integration test prerequisites
65+ - name : Copilot Setup - Install xvfb and VS Code dependencies
66+ run : |
67+ sudo apt-get update
68+ sudo apt-get install -y xvfb libasound2 libgbm1 libgtk-3-0 libxshmfence1
69+
70+ - name : Copilot Setup - Build server (extension dependency)
71+ run : npm run build -w server
72+
73+ - name : Copilot Setup - Bundle extension and server
74+ working-directory : extensions/vscode
75+ run : |
76+ npm run bundle
77+ npm run bundle:server
78+
79+ - name : Copilot Setup - Download VS Code for integration tests
80+ working-directory : extensions/vscode
81+ run : npm run download:vscode
Original file line number Diff line number Diff line change 148148 "bundle" : " node esbuild.config.js" ,
149149 "bundle:server" : " node scripts/bundle-server.js" ,
150150 "clean" : " rm -rf dist server .vscode-test/* *.vsix" ,
151+ "download:vscode" : " node scripts/download-vscode.js" ,
151152 "lint" : " eslint src/ test/" ,
152153 "lint:fix" : " eslint src/ test/ --fix" ,
153154 "package" : " vsce package --no-dependencies --out codeql-development-mcp-server-v$(node -e 'process.stdout.write(require(`./package.json`).version)').vsix" ,
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ /**
3+ * Downloads VS Code for integration testing.
4+ *
5+ * This script pre-downloads the VS Code instance required by @vscode/test-cli
6+ * for running Extension Host integration tests. Used in CI/copilot setup steps
7+ * to ensure VS Code is available before running tests.
8+ *
9+ * Usage: node scripts/download-vscode.js [version]
10+ * Default version: stable
11+ */
12+
13+ import { downloadAndUnzipVSCode } from '@vscode/test-electron' ;
14+
15+ const version = process . argv [ 2 ] || 'stable' ;
16+
17+ console . log ( `Downloading VS Code (${ version } ) for integration tests...` ) ;
18+
19+ try {
20+ const vscodeExecutablePath = await downloadAndUnzipVSCode ( version ) ;
21+ console . log ( `✅ VS Code downloaded to: ${ vscodeExecutablePath } ` ) ;
22+ } catch ( error ) {
23+ console . error ( '❌ Failed to download VS Code:' , error . message ) ;
24+ process . exit ( 1 ) ;
25+ }
You can’t perform that action at this time.
0 commit comments