You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our earlier commit e2de938 created the file
coverage/codecov-result.json fixing the
"Found 0 coverage files" error, but the site still showed 0%.
Codecov's backend rejected the upload as "Unusable report ...
incorrect data format": the abandoned codecov 0.6.0 gem's formatter
emits the deprecated v2 "network" report format (a filename list, a
"<<<<<< network" separator, then one line of coverage JSON) which isn't
even valid JSON despite the .json name. The pinned Codecov CLI uploaded
it without complaint because `--plugin noop` means it never parses the
file, so the upload step looked healthy while the backend silently
discarded the data.
This commit changes the approach for recording coverage results. Now we
write coverage/coverage.json with SimpleCov::Formatter::JSONFormatter
(from simplecov_json_formatter), whose output Codecov parses natively,
and point the CLI --file at it. As before this runs in test:coverage_gaps
rather than test_helper.rb, because CI runs with DEFER_COVERAGE set
(swapping in SimpleFormatter) and the merged result is only complete once
all parallel + system runs finish.
This removes the abandoned codecov gem entirely and drops its dead formatter
reference from test_helper.rb (it never ran in CI anyway, since
DEFER_COVERAGE overrode it). The codecov gem was the only thing pulling
in simplecov, including its <0.22 pin, so we now list simplecov and
simplecov_json_formatter explicitly: both are required directly (in
test_helper.rb and test:coverage_gaps respectively), so declaring them
prevents a future simplecov release that stops bundling the JSON
formatter from breaking coverage reporting in a surprising way.
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments