From 09cb85f3e5d31849f2e45d2dbadbea3ce681f73b Mon Sep 17 00:00:00 2001 From: Erik van der Boom Date: Mon, 27 Apr 2026 23:27:03 +0200 Subject: [PATCH] fix(ci): use bash shell for template sync; exclude synced templates from vscode-ext coverage Two regressions from the previous sync change: 1. The Sync templates step uses 'rm -rf' / 'cp -R', which the windows-latest runner executes under PowerShell where those flags don't exist. Pin the step to 'shell: bash' so it runs in Git Bash on Windows. The release workflow already targets ubuntu-only, so no change needed there. 2. The synced vscode-ext/src/templates/ folder is matched by the coverage 'src/**/*.ts' glob, inflating the function count without contributing any vscode-ext tests (those templates are exercised by mcp-ts/test/templates.test.ts). Exclude src/templates/** in vitest.config.ts the same way ai-setup-templates.ts already is. --- .github/workflows/ci.yml | 1 + vscode-ext/vitest.config.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f71d04..e4d9f64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,7 @@ jobs: # ai-setup-templates.ts and the templates/ folder copy are .gitignored # — always generated fresh here from the mcp-ts source of truth. - name: Sync templates to vscode-ext + shell: bash run: | cp mcp-ts/src/templates.ts vscode-ext/src/ai-setup-templates.ts rm -rf vscode-ext/src/templates diff --git a/vscode-ext/vitest.config.ts b/vscode-ext/vitest.config.ts index 7ce2961..ba23e43 100644 --- a/vscode-ext/vitest.config.ts +++ b/vscode-ext/vitest.config.ts @@ -10,6 +10,7 @@ export default defineConfig({ include: ['src/**/*.ts'], exclude: [ 'src/ai-setup-templates.ts', // generated copy of mcp-ts/src/templates.ts + 'src/templates/**', // generated copy of mcp-ts/src/templates/ (covered by mcp-ts tests) 'src/extension.ts', // thin VS Code activation layer; exercised via integration-commands mocks 'src/ai-setup.ts', // thin wrapper around mcp-ts setupAiFiles; covered by mcp-ts tests 'src/mcp.ts', // vscode.lm.registerTool wiring; activation-only, not reachable in unit tests