ci: upload an inspectable coverage report as a build artifact - #40
Open
windkh wants to merge 1 commit into
Open
Conversation
The standard's CI template uploads the coverage report so a threshold failure can be inspected from the failing run instead of only being reproducible locally. This repo ran `coverage:check` but never kept the report. Two things were needed to make that worth having. c8 was running with its default text reporter, so `coverage/` held only tmp/ — raw V8 JSON, which is not something anyone can inspect. Added `reporter: ["text", "lcov"]`, so the run now also produces lcov.info and a browsable lcov-report. And the artifact uploads only those two, not the whole coverage/ directory: tmp/ is 23 MB here against a 647 kB report, so uploading the directory would ship ~97% dead weight on every run for 14 days. Gated on the 22.x leg only: the report is identical across matrix legs, and two legs writing the same artifact name is an error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
Follow-up to #39. This commit was pushed to that branch just after you merged it, so it never got a PR or a CI run — re-raised here on its own branch.
The standard's CI template uploads the coverage report so a threshold failure can be inspected from the failing run instead of only being reproducible locally. This repo ran
coverage:checkbut never kept the report.Two things were needed to make that worth having:
c8 had to actually emit a report. It was running with its default text reporter, so the only thing under
coverage/wastmp/— its raw V8 dump, which is inspectable by nothing. Added"reporter": ["text", "lcov"], so a run now also produceslcov.infoand a browsablelcov-report.The upload had to skip the dump.
tmp/is 23 MB here against a 647 kB report, so uploadingcoverage/would ship ~97% dead weight on every run for the whole 14-day retention window. Narrowed tolcov-report+lcov.info.Gated on the 22.x leg only: the report is identical across matrix legs, and two legs writing the same artifact name is an error.
Both problems existed in the standard's template too, and in
node-red-contrib-telegrambotwhere I'd added the step earlier — fixed in node-red-standards 0.4.2, which now also records that the c8 block must emit a report for this step to produce anything usable.Verified locally: lint, format:check, test and coverage:check all clean.
🤖 Generated with Claude Code