Skip to content

Generate codecov-result.json for CI#2855

Merged
david-a-wheeler merged 1 commit into
mainfrom
codecov_2
Jun 25, 2026
Merged

Generate codecov-result.json for CI#2855
david-a-wheeler merged 1 commit into
mainfrom
codecov_2

Conversation

@david-a-wheeler

Copy link
Copy Markdown
Collaborator

Codecov uploads were failing with "Found 0 coverage files to report" because coverage/codecov-result.json was never written. The test workers run with DEFER_COVERAGE set, which swaps in the minimal SimpleFormatter, so SimpleCov::Formatter::Codecov never runs during the test processes. The finalize task test:coverage_gaps merged the results but never invoked the Codecov formatter, so no file existed for the pinned CLI to upload.

This commit modifies the test process so, when running in CI, we write coverage/codecov-result.json from the merged result in test:coverage_gaps. We call the gem's inner
Codecov::SimpleCov::Formatter directly rather than SimpleCov::Formatter::Codecov, since the latter also invokes the gem's deprecated built-in network uploader; we upload separately with a pinned, hash-verified CLI and want only the file-writing half.

Codecov uploads were failing with "Found 0 coverage files to report"
because coverage/codecov-result.json was never written. The test workers
run with DEFER_COVERAGE set, which swaps in the minimal SimpleFormatter,
so SimpleCov::Formatter::Codecov never runs during the test processes.
The finalize task test:coverage_gaps merged the results but never invoked
the Codecov formatter, so no file existed for the pinned CLI to upload.

This commit modifies the test process so, when running in CI, we
write coverage/codecov-result.json from the merged result in
test:coverage_gaps. We call the gem's inner
Codecov::SimpleCov::Formatter directly rather than
SimpleCov::Formatter::Codecov, since the latter also invokes the gem's
deprecated built-in network uploader; we upload separately with a
pinned, hash-verified CLI and want only the file-writing half.

Co-Authored-By: David A. Wheeler <dwheeler@dwheeler.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
@david-a-wheeler david-a-wheeler merged commit e2de938 into main Jun 25, 2026
6 checks passed
@david-a-wheeler david-a-wheeler deleted the codecov_2 branch June 25, 2026 22:15
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