Skip to content

Detailed code coverage reporting #279

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

Merged
merged 15 commits into from
Jul 29, 2025
12 changes: 0 additions & 12 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,3 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-llvm-cov
- run: cargo llvm-cov --no-cfg-coverage --all-features --cobertura --output-path ./coverage.xml
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

[![cw-multi-test][crates-badge]][crates-url]
[![docs][docs-badge]][docs-url]
[![codecov][codecov-badge]][codecov-url]
![coverage][coverage-badge]
[![license][apache-badge]][apache-url]

[crates-badge]: https://img.shields.io/crates/v/cw-multi-test.svg
[crates-url]: https://crates.io/crates/cw-multi-test
[docs-badge]: https://docs.rs/cw-multi-test/badge.svg
[docs-url]: https://docs.rs/cw-multi-test
[codecov-badge]: https://codecov.io/gh/CosmWasm/cw-multi-test/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/CosmWasm/cw-multi-test
[coverage-badge]: https://img.shields.io/badge/coverage-94%25%20%E2%94%82%2093%25%20%E2%94%82%2095%25-21b577.svg
[apache-badge]: https://img.shields.io/badge/License-Apache%202.0-blue.svg
[apache-url]: LICENSE
[notice-url]: NOTICE
Expand Down
15 changes: 11 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,23 @@ tasks:
- cmd: cargo +1.81.0-x86_64-unknown-linux-gnu clippy --all-targets --no-default-features -- -D warnings

cov:
desc: Generates the code coverage report in HTML format
desc: Generates the code coverage report in text format printed to stdout
cmds:
- cmd: cargo +stable llvm-cov clean
- cmd: cargo +stable llvm-cov --no-cfg-coverage --all-features

cov-html:
desc: Generates the code coverage report in HTML format and opens it in a browser
cmds:
- cmd: cargo +stable llvm-cov clean
- cmd: cargo +stable llvm-cov --no-cfg-coverage --all-features --html --open

cob:
desc: Generates the code coverage report in "cobertura" format
cov-badge:
desc: Generates the detailed code coverage badge
cmds:
- cmd: cargo +stable llvm-cov clean
- cmd: cargo +stable llvm-cov --no-cfg-coverage --all-features --cobertura --output-path ./target/coverage.xml
- cmd: cargo +stable llvm-cov --no-cfg-coverage --all-features --json --summary-only --output-path ./target/coverage.json
- cmd: coverio ./target/coverage.json

doc:
desc: Generates documentation with all features enabled
Expand Down