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.
This commit is contained in:
Erik van der Boom 2026-04-27 23:27:03 +02:00
parent bf5a0ca742
commit 09cb85f3e5
2 changed files with 2 additions and 0 deletions

View file

@ -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

View file

@ -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