Conversation
The test:coverage script previously chained test:unit (which runs compile) and npm test (which runs pretest: compile + lint), causing TypeScript to compile twice and ESLint to run twice on every Linux CI coverage run. Flattened the script to: compile -> lint -> c8 mocha -> vscode-test This removes one full tsc + eslint execution from every Linux CI run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
=======================================
Coverage 59.17% 59.17%
=======================================
Files 6 6
Lines 1984 1984
Branches 143 143
=======================================
Hits 1174 1174
Misses 810 810 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes the VS Code extension’s CI test pipeline by removing redundant TypeScript compilation and ESLint passes from the Linux test:coverage run, reducing CI time without changing the set of tests executed.
Changes:
- Replaces
test:coverage’s chainedtest:unit && npm testwith a flattened pipeline (compile → lint → c8+mocha → vscode-test) to avoid duplicate compile/lint execution.
github-actions bot
pushed a commit
that referenced
this pull request
Mar 3, 2026
…ompile) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 3, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes a redundant TypeScript compilation + ESLint pass from the
test:coveragescript, which runs on every Linux CI job. This reduces unnecessary work without changing test behavior.Optimizations
1. Eliminate Double Compilation in
test:coverageType: Resource / Efficiency
Impact: Saves ~3–8 seconds per Linux CI run (one
tsc+ oneeslint srcexecution removed)Risk: Low
Root Cause:
The previous
test:coveragescript chained two commands that each triggered compilation:Changes:
Before:
After:
The flattened script runs the full pipeline once:
compile → lint → c8 mocha → vscode-test. Thevscode-testbinary is called directly (bypassing thepretesthook) since compilation and linting have already run.Rationale:
npm testalways triggers thepretestlifecycle hook (compile && lint). Chainingtest:unit(which also compiles) and thennpm testcausedtscandeslintto each run twice. The flattened script produces identical results with one fewer compile+lint cycle.Detailed Analysis
Previous execution path for
npm run test:coverageon Linux CI:npm run test:unit→npm run compile(compile chore(main): release 0.1.0 #1) →c8 mocha out/unit/unit.test.jsnpm test→pretest(compile ci: remove redundant pull request branch specification #2 + lint chore(main): release 0.1.0 #1) →vscode-testNew execution path:
npm run compile(compile chore(main): release 0.1.0 #1)npm run lint(lint chore(main): release 0.1.0 #1)c8 --config .c8rc.json mocha out/unit/unit.test.jsvscode-testThe
test:unitscript is unchanged and still self-contained with its owncompilestep for standalone use. Only thetest:coverageaggregation script is updated.Expected Impact
npm run test:unit: Unaffected, still self-containedTesting Recommendations
vscode-testbinary resolves correctly innode_modules/.bin