-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore: add test coverage reporting job to CI #262
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,7 +200,9 @@ args = ["target", "add", "wasm32-unknown-unknown"] | |
category = "Test" | ||
description = "Install wasm32-wasi target" | ||
command = "rustup" | ||
args = ["target", "add", "wasm32-wasi"] | ||
# `wasm32-wasi` target is renamed to `wasm32-wasip1` | ||
# https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html | ||
args = ["target", "add", "wasm32-wasip1"] | ||
|
||
[tasks.install-rust-src] | ||
category = "Test" | ||
|
@@ -212,7 +214,13 @@ args = ["component", "add", "rust-src"] | |
category = "Test" | ||
description = "Install cargo-component extension" | ||
command = "cargo" | ||
args = ["install", "[email protected]"] | ||
args = ["install", "[email protected]"] | ||
|
||
[tasks.install-cargo-tarpaulin] | ||
category = "Test" | ||
description = "Install cargo-tarpaulin extension" | ||
command = "cargo" | ||
args = ["install", "cargo-tarpaulin"] | ||
|
||
[tasks.test-rust] | ||
category = "Test" | ||
|
@@ -246,6 +254,24 @@ args = [ | |
] | ||
dependencies = ["litcheck"] | ||
|
||
[tasks.test-rust-cov] | ||
category = "Test" | ||
description = "Runs tests written in Rust and generates code coverage report" | ||
command = "cargo" | ||
args = [ | ||
"tarpaulin", | ||
"--timeout=360", | ||
"--out", | ||
"lcov", | ||
] | ||
dependencies = [ | ||
"install-wasm-target", | ||
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. Now that we use |
||
"install-wasm-wasi-target", | ||
"install-rust-src", | ||
"install-cargo-component", | ||
"install-cargo-tarpaulin", | ||
] | ||
|
||
[tasks.litcheck] | ||
category = "Test" | ||
description = "Set up the litcheck utility" | ||
|
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.
You don't actually need this task, if you have a task that uses
cargo
as the command,cargo-make
will check if the task name passed tocargo
exists, and if not, it will attempt tocargo install
it.There's also
cargo-make
configuration for modifying howcargo install
is invoked, like if the crate name is different, or additional arguments are needed. Not needed here, but just FYI.The only reason to explicitly install things is when those things aren't normal
cargo
plugins, e.g.mdbook