ci: add Codecov integration with cargo-tarpaulin#188
Merged
ayomideadeniran merged 1 commit intoSoroLabs:mainfrom Mar 30, 2026
Merged
ci: add Codecov integration with cargo-tarpaulin#188ayomideadeniran merged 1 commit intoSoroLabs:mainfrom
ayomideadeniran merged 1 commit intoSoroLabs:mainfrom
Conversation
- Add 'coverage' job to CI workflow using cargo-binstall for fast tarpaulin install - Run tarpaulin with --out Xml --all-features --workspace flags - Upload cobertura.xml to Codecov via codecov/codecov-action@v4 - Add .tarpaulin.toml to exclude test files and external SDK deps from coverage
|
@AnnabelJoe Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Pr under review. |
Contributor
|
Thanks for the PR! This is currently under review and I will get back to you shortly. |
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.
Summary
Closes #158
Adds automated code coverage reporting to the CI pipeline using
cargo-tarpaulinand Codecov.io.Changes
.github/workflows/ci.yml— Newcoveragejob that:cargo-tarpaulinviacargo-binstall(fast binary install, no compile wait)cargo tarpaulin --out Xml --all-features --workspaceagainst the full Rust workspacecobertura.xmlto Codecov viacodecov/codecov-action@v4mainand all pull requests (same as existing jobs).tarpaulin.toml— Root-level config that excludes:*/tests/*,*_test.rs,test_*)soroban_sdk,soroban_env_host) from coverage percentageRequired Setup
Before this workflow will succeed, add your Codecov token as a repository secret:
CODECOV_TOKENNotes
coveragejob runs independently fromtestandbuild— a coverage failure won't block the other jobsfail_ci_if_error: trueis set so a failed Codecov upload surfaces as a visible CI failure rather than silently passing━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
One thing to do before merging: add CODECOV_TOKEN as a GitHub Actions secret (instructions are in the PR description). Without it the upload step will
fail.