Skip to content

Commit fbd9ad7

Browse files
authored
Fix: Build and Test Extension workflow — CodeQL CLI missing, bridge test parent-dir assertions, query.log fixture (#72)
1 parent 1eced47 commit fbd9ad7

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

.github/workflows/build-and-test-extension.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
npm run bundle
5858
npm run bundle:server
5959
60+
- name: Setup CodeQL environment for integration tests
61+
uses: ./.github/actions/setup-codeql-environment
62+
with:
63+
add-to-path: 'true'
64+
install-language-runtimes: 'false'
65+
6066
- name: Run Extension Host integration tests
6167
working-directory: extensions/vscode
6268
run: xvfb-run -a npm run test:integration

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ codeql-development-mcp-server.code-workspace
1919

2020
## Globs to ignore
2121
*.log
22+
# Allow *.log files committed as test fixtures
23+
!extensions/vscode/test/fixtures/**/*.log
2224
*.pid
2325
*.swp
2426
*.swo
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[2026-01-15 10:00:00.000 UTC] [SPAMMY] execute query-server2> runQuery called with /home/user/codeql-workspace/queries/ExampleQuery1.ql
2+
[2026-01-15 10:00:00.001 UTC] [SPAMMY] execute query-server2> --dbscheme=/home/user/.local/share/vscode-codeql/databases/test-javascript-db/db-javascript/semmlecode.javascript.dbscheme
3+
[2026-01-15 10:00:02.345 UTC] [SPAMMY] execute query-server2> Compilation finished in 2344 ms.
4+
[2026-01-15 10:00:03.678 UTC] [SPAMMY] execute query-server2> Evaluation finished in 1333 ms.

extensions/vscode/test/suite/bridge.integration.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ suite('vscode-codeql Bridge Tests', () => {
100100
});
101101

102102
test('CODEQL_QUERY_RUN_RESULTS_DIRS parent should exist', async () => {
103+
const codeqlExt = vscode.extensions.getExtension(CODEQL_EXTENSION_ID);
104+
if (!codeqlExt) return; // vscode-codeql not installed — storage dirs won't exist
105+
103106
const envBuilder = api.environmentBuilder;
104107
if (!envBuilder) return;
105108

@@ -118,6 +121,9 @@ suite('vscode-codeql Bridge Tests', () => {
118121
});
119122

120123
test('CODEQL_MRVA_RUN_RESULTS_DIRS parent should exist', async () => {
124+
const codeqlExt = vscode.extensions.getExtension(CODEQL_EXTENSION_ID);
125+
if (!codeqlExt) return; // vscode-codeql not installed — storage dirs won't exist
126+
121127
const envBuilder = api.environmentBuilder;
122128
if (!envBuilder) return;
123129

0 commit comments

Comments
 (0)