Skip to content

Commit

Permalink
ci(coverage): use llvm-cov for source based coverage (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart authored Mar 30, 2023
1 parent bdae36d commit 05147f3
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,15 @@ command = "cargo"
args = ["build", "--release", "--locked"]
command = "cargo"

[tasks.build-coverage]
args = ["build"]
command = "cargo"
description = "Compile the source code and create testable artifacts."
env = { RUSTFLAGS = "-Cinstrument-coverage" }

[tasks.test]
args = ["test", "--lib", "--tests", "--workspace", "--locked"]
command = "cargo"
dependencies = ["install-llvm-tools-preview", "build-coverage"]
description = "Run all unit tests."
env = { LLVM_PROFILE_FILE = "default.profraw", RUST_BACKTRACE = 1 }

[tasks.test-coverage]
args = ["tarpaulin", "-o", "lcov"]
dependencies = ["install-llvm-tools-preview", "install-llvm-cov"]
command = "cargo"
dependencies = ["install-tarpaulin"]
args = ["llvm-cov", "--workspace", "--lcov", "--output-path", "lcov.info"]

[tasks.install_wasm]
script = '''
Expand Down Expand Up @@ -495,8 +487,8 @@ install_crate = { rustup_component_name = "rustfmt" }
[tasks.install-taplo-cli]
install_crate = { crate_name = "taplo-cli", binary = "taplo", test_arg = "--help" }

[tasks.install-tarpaulin]
install_crate = { crate_name = "cargo-tarpaulin" }
[tasks.install-llvm-cov]
install_crate = { crate_name = "cargo-llvm-cov" }

[tasks.install-cosmwasm-check]
install_crate = { crate_name = "cosmwasm-check" }
Expand Down

0 comments on commit 05147f3

Please sign in to comment.