Skip to content

Commit 8ad2736

Browse files
committed
Add tooling for test coverage and execution
Introduce `cargo-llvm-cov` and `cargo-nextest` for enhanced testing and coverage visualization. Update `setup` and `test` scripts to use new tools. Adjust `.gitignore` and `mise.toml` to account for generated coverage reports and dependencies. Enable additional Rust components via `rust-toolchain.toml` for seamless integration.
1 parent 877f3fe commit 8ad2736

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/.idea/
2+
/coverage/
23
/target/
34
.DS_Store

bin/setup

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env sh
22
#MISE description="install dependencies and setup the dev environment"
33

4-
cargo install cargo-audit cargo-outdated cargo-sort
4+
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu clippy
5+
cargo install cargo-audit cargo-llvm-cov cargo-nextest cargo-outdated cargo-sort

bin/test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
#MISE description="run unit tests"
33
#MISE alias=["t"]
44

5-
cargo test
5+
cargo llvm-cov nextest --branch --summary-only
6+
cargo llvm-cov report --branch --html --output-dir coverage
7+
cargo llvm-cov report --branch --lcov --output-path coverage/lcov.info

mise.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
includes = ["bin"]
33

44
[tools]
5+
"cargo:cargo-audit" = "latest"
6+
"cargo:cargo-llvm-cov" = "latest"
7+
"cargo:cargo-nextest" = "latest"
8+
"cargo:cargo-outdated" = "latest"
9+
"cargo:cargo-sort" = "latest"
510
"npm:markdownlint-cli" = "latest"
6-
rust = "1.89"
11+
rust = { version = "nightly", components = "clippy,llvm-tools-preview,rustfmt,rust-src" }

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
22
channel = "nightly"
3-
components = ["clippy", "rustfmt"]
3+
components = ["clippy", "llvm-tools-preview", "rustfmt", "rust-src"]

0 commit comments

Comments
 (0)