Skip to content

Commit

Permalink
build(test): use llvm-cov instead of grcov
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Sep 22, 2023
1 parent 2b6c02c commit f98a31d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.lcov
files: ./lcov.info
fail_ci_if_error: false
12 changes: 5 additions & 7 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,15 @@ description = "Run all unit tests."
env = { LLVM_PROFILE_FILE = "default_%p.profraw", RUST_BACKTRACE = 1, RUSTFLAGS = "-Cinstrument-coverage" }

[tasks.test-coverage]
dependencies = ["test", "install-grcov"]
script = '''
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*cargo*" -o coverage.lcov
'''
args = ["llvm-cov", "--workspace", "--lcov", "--output-path", "lcov.info"]
command = "cargo"
dependencies = ["install-llvm-tools-preview", "install-llvm-cov"]

[tasks.install-llvm-tools-preview]
install_crate = { rustup_component_name = "llvm-tools-preview" }

[tasks.install-grcov]
install_crate = { crate_name = "grcov", min_version = "0.8.19" }
[tasks.install-llvm-cov]
install_crate = { crate_name = "cargo-llvm-cov", min_version = "0.5.31" }

[tasks.publish]
args = ["publish", "--token", "${CARGO_API_TOKEN}"]
Expand All @@ -93,4 +92,3 @@ min_version = "0.36.13"

[env]
CARGO_MAKE_CRATE_INSTALLATION_LOCKED = true

0 comments on commit f98a31d

Please sign in to comment.