Skip to content

feat: add code coverage reporting via Codecov for backend and contracts#398

Open
binayyub4211 wants to merge 5 commits into
LabsCrypt:mainfrom
binayyub4211:feature/issue-373-codecov
Open

feat: add code coverage reporting via Codecov for backend and contracts#398
binayyub4211 wants to merge 5 commits into
LabsCrypt:mainfrom
binayyub4211:feature/issue-373-codecov

Conversation

@binayyub4211

Copy link
Copy Markdown

Closes #373

Implemented comprehensive code coverage tracking for both backend (Vitest) and smart contracts (Tarpaulin). Coverage reports are now automatically uploaded to Codecov during CI runs, with enforced thresholds to prevent coverage erosion.

Changes:

Backend: Enabled lcov reporting, set 60% thresholds, and added @vitest/coverage-v8.
Contracts: Integrated cargo-tarpaulin with 70% failure threshold.
CI: Added Codecov upload actions for all coverage reports.
UI/Docs: Added Codecov badge to README and created codecov.yml for PR comments.
Verification:

Verified Vitest configuration structure.
Validated GitHub Actions YAML syntax.
Ensured thresholds match the requirements.

@ogazboiz

Copy link
Copy Markdown
Contributor

hey, main was failing CI from broken auth imports + frontend parse errors. fixed and pushed to main now. please rebase to pick up the fixes:

git fetch upstream
git rebase upstream/main
git push --force-with-lease

if there's a conflict, resolve it locally and we'll review once CI is green.

@ogazboiz

ogazboiz commented May 1, 2026

Copy link
Copy Markdown
Contributor

hey, main CI is fully green now. there were several real TypeScript and test issues from #444's merge that have all been fixed. please rebase one more time:

git fetch upstream
git rebase upstream/main
git push --force-with-lease

your PR's diff should be much cleaner after this rebase since main now has the canonical versions of cancel.ts, sorobanService.ts, and the withdraw test.

@binayyub4211 binayyub4211 force-pushed the feature/issue-373-codecov branch from 4d0bc9b to 9a1067f Compare May 7, 2026 21:34
@binayyub4211

Copy link
Copy Markdown
Author

hey, main CI is fully green now. there were several real TypeScript and test issues from #444's merge that have all been fixed. please rebase one more time:

git fetch upstream
git rebase upstream/main
git push --force-with-lease

your PR's diff should be much cleaner after this rebase since main now has the canonical versions of cancel.ts, sorobanService.ts, and the withdraw test.

done

@ogazboiz

ogazboiz commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

hey, please rebase to pick up recent main changes (#706 fixes test loading, #499 fixed the contract). your branch's CI is failing on issues that main has since resolved.

git fetch upstream
git rebase upstream/main
git push --force-with-lease

@ogazboiz

ogazboiz commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

heads up: main's ci was broken (the Backend CI and Backend Docker Image CI jobs) until the fixes in #969 and #974 just landed, so the red backend/docker checks on this pr are almost certainly stale, they ran against the broken main. please rebase to re-test against the now-green main: git fetch origin && git rebase origin/main && git push --force-with-lease. once it's green i'll review and merge. (if a non-backend check like Frontend CI is still red after the rebase, that part is a real issue worth a look, since frontend ci was passing on main.)

@ogazboiz ogazboiz 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.

the codecov + coverage setup is a reasonable idea, but two real blockers:

  1. backend/package-lock.json has unresolved merge-conflict markers (<<<<<<< HEAD around line 55), which breaks npm ci everywhere. resolve the conflict and regenerate the lockfile.
  2. the @vitest/coverage-v8 pin is incompatible with the installed vitest ("does not provide export BaseCoverageProvider"), align coverage-v8 to your vitest major.
    heads up this pr is actually the source of the coverage-v8 npm ci churn that's reding several other prs too, so getting it right helps everyone. also #927 also adds codecov + mangles the lockfile, you two overlap, pick one and close the other.

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.

Add code coverage reporting via Codecov

2 participants