-
Notifications
You must be signed in to change notification settings - Fork 57
ci: enforce Rust contract coverage #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,9 +148,20 @@ jobs: | |
| - name: Run clippy | ||
| working-directory: packages/contracts | ||
| run: cargo clippy --all-targets -- -D warnings | ||
| - name: Run contract tests | ||
| - name: Install cargo-llvm-cov | ||
| uses: taiki-e/install-action@cargo-llvm-cov | ||
| - name: Install LLVM coverage tools | ||
| run: rustup component add llvm-tools-preview | ||
| - name: Measure contract coverage | ||
| working-directory: packages/contracts | ||
| run: cargo test | ||
| run: >- | ||
| cargo llvm-cov | ||
| --package meridian-vault | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| --package meridian-blend-adapter | ||
| --package meridian-defindex-adapter | ||
| --package adapter-common | ||
| --summary-only | ||
| --fail-under-lines 97.5 | ||
| - name: Build wasm | ||
| working-directory: packages/contracts | ||
| run: cargo build --target wasm32-unknown-unknown --release | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adapter-commonis missing from this--packagelist, so its coverage is never measured, confirmed directly in this run's own output: the printed table only has rows forblend-adapter/src/lib.rs,defindex-adapter/src/lib.rs, andvault/src/lib.rs, noadapter-commonrow at all. That crate has zero tests of its own (no#[cfg(test)]module) and still has two.unwrap()-based panics inrequire_vault_auth/get_usdc. #533's own motivation was closing exactly this kind of untested-panic gap in the code that custodies funds, so leaving out the one crate that's actually fully untested undercuts the point of adding the gate. Add--package adapter-commonto the list.