Merged
Conversation
Run unit tests with --experimental-test-coverage on all matrix legs and publish a Markdown summary to the GitHub step summary on the Node 20.x run. Changes: - scripts/parse-test-output.js: new parser that reads captured test runner output (TAP summary + text coverage table) and emits a Markdown table with test counts and per-module coverage (backend/, utils/, all-files total) - vscode-extension/package.json: add test:coverage:ci script (same as test:coverage but without threshold flags, no compile-tests prefix — for use in CI where compile is a separate step) - .github/workflows/ci.yml: replace the bare node --test step with a bash step that captures output via tee + PIPESTATUS, then adds a follow-on step (20.x only, always()) that calls the parser and appends to GITHUB_STEP_SUMMARY Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests were hardcoded with /home/user/ paths but the function checks against os.homedir() which returns /home/runner on GitHub Actions CI. Use os.homedir() dynamically so tests pass on any platform. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- ci.yml: remove Node 20.x (--test-coverage-include requires Node 22+), restore --test-coverage-include flags, update all 20.x conditions to 22.x - build.yml: replace 20.x with 22.x in matrix, add unit test run step (with coverage on Node 22+, plain test on Node 18.x), add step summary on all matrix combinations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Node 18 is EOL (April 2025) and --test-force-exit requires Node 20.14+. Use [22.x, 24.x] to match CI matrix — allows removing the Node version conditional from the test step entirely. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Adds per-module test coverage display to the GitHub Actions step summary on every CI run.
What's shown in the summary (Node 20.x run only)
📊 Coverage Summary
High-level only — one row per top-level module directory, not individual files.
Changes
scripts/parse-test-output.js(new) — parses Node.js TAP summary lines (# tests,# pass, etc.) and the text coverage table, then emits a Markdown step summaryvscode-extension/package.json— addstest:coverage:ciscript (same astest:coveragebut without threshold flags and nocompile-testsprefix, for use in CI where compilation is a separate step).github/workflows/ci.yml— replaces the barenode --teststep with a bash step that runs with--experimental-test-coverage, captures output viatee + PIPESTATUS, and adds a follow-onPublish test results to step summarystep (Node 20.x only,if: always())Notes