Skip to content

ci: upload Hardhat-tests coverage to Codecov - #1388

Merged
nebasuke merged 1 commit into
mainfrom
ci/codecov-disable-search
May 7, 2026
Merged

ci: upload Hardhat-tests coverage to Codecov#1388
nebasuke merged 1 commit into
mainfrom
ci/codecov-disable-search

Conversation

@nebasuke

@nebasuke nebasuke commented May 6, 2026

Copy link
Copy Markdown
Member

Why

The hardhat-tests workflow already runs cargo llvm-cov report after the JS test run and produces a codecov.json, but it never had an upload step — the file was generated and discarded. That suite exercises the napi binding code paths end-to-end (subscriptions, provider lifecycles, Solidity test runs, stack-trace decoding), so without its upload those files look under-covered on every PR even though they are tested.

Most visible on #1385 (napi v3 migration): patch coverage 52% with call_override.rs, provider.rs, and trace/debug.rs showing 0% — exactly the files Hardhat-tests would cover.

Change

Add a codecov-action upload step to hardhat-tests.yml after cargo llvm-cov report, matching the pattern already used by the three uploads in edr-ci.yml (matrix-named, SHA-pinned, fail_ci_if_error: false, CODECOV_TOKEN).

@changeset-bot

changeset-bot Bot commented May 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: adea231

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nebasuke
nebasuke had a problem deploying to github-action-benchmark May 6, 2026 18:32 — with GitHub Actions Error
@nebasuke nebasuke added the no changeset needed This PR doesn't require a changeset label May 6, 2026
@nebasuke
nebasuke force-pushed the ci/codecov-disable-search branch from ef7e7d4 to b8963bf Compare May 6, 2026 18:34
@nebasuke
nebasuke temporarily deployed to github-action-benchmark May 6, 2026 18:34 — with GitHub Actions Inactive
@nebasuke
nebasuke temporarily deployed to github-action-benchmark May 6, 2026 18:35 — with GitHub Actions Inactive
@nebasuke
nebasuke had a problem deploying to github-action-benchmark May 6, 2026 18:35 — with GitHub Actions Failure
@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.27%. Comparing base (7baba1b) to head (adea231).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1388      +/-   ##
==========================================
+ Coverage   74.41%   79.27%   +4.85%     
==========================================
  Files         444      444              
  Lines       76051    76051              
  Branches    76051    76051              
==========================================
+ Hits        56597    60293    +3696     
+ Misses      17462    13630    -3832     
- Partials     1992     2128     +136     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nebasuke nebasuke changed the title ci: opt out of codecov-action v5 autodiscover ci: upload Hardhat-tests coverage to Codecov May 6, 2026
The hardhat-tests workflow already ran `cargo llvm-cov report` against
the JS test run, but the resulting `codecov.json` was never uploaded.
Hardhat-tests is the suite that exercises the napi binding code paths
end-to-end (subscriptions, providers, Solidity test runs, stack-trace
decoding), so dropping its report leaves those files looking
under-covered on every PR.

Add the Codecov upload step matching the pattern used in edr-ci.yml.
@nebasuke
nebasuke force-pushed the ci/codecov-disable-search branch from b8963bf to adea231 Compare May 6, 2026 23:33
@nebasuke
nebasuke temporarily deployed to github-action-benchmark May 6, 2026 23:33 — with GitHub Actions Inactive
@nebasuke
nebasuke temporarily deployed to github-action-benchmark May 6, 2026 23:35 — with GitHub Actions Inactive
@nebasuke
nebasuke temporarily deployed to github-action-benchmark May 6, 2026 23:35 — with GitHub Actions Inactive
@nebasuke
nebasuke marked this pull request as ready for review May 6, 2026 23:46
@nebasuke
nebasuke requested a review from a team May 6, 2026 23:46

@popescuoctavian popescuoctavian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find, thanks!

@nebasuke
nebasuke added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit fb993e8 May 7, 2026
53 checks passed
@nebasuke
nebasuke deleted the ci/codecov-disable-search branch May 7, 2026 09:03
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no changeset needed This PR doesn't require a changeset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants