Skip to content

ci: upload an inspectable coverage report as a build artifact - #40

Open
windkh wants to merge 1 commit into
mainfrom
ci/coverage-report-artifact
Open

ci: upload an inspectable coverage report as a build artifact#40
windkh wants to merge 1 commit into
mainfrom
ci/coverage-report-artifact

Conversation

@windkh

@windkh windkh commented Aug 18, 2026

Copy link
Copy Markdown
Owner

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:check but 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/ was tmp/ — its raw V8 dump, which is inspectable by nothing. Added "reporter": ["text", "lcov"], so a run now also produces lcov.info and a browsable lcov-report.

The upload had to skip the dump. tmp/ is 23 MB here against a 647 kB report, so uploading coverage/ would ship ~97% dead weight on every run for the whole 14-day retention window. Narrowed to lcov-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-telegrambot where 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant