mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
build: add coverage recipes to justfile
This commit is contained in:
parent
7f529e35b2
commit
53086a90a6
@ -27,7 +27,8 @@ fn bare_address(val: &str) -> &str {
|
|||||||
val.split("]:")
|
val.split("]:")
|
||||||
.next()
|
.next()
|
||||||
.map(|s| s.trim_start_matches('[').trim_end_matches(']'))
|
.map(|s| s.trim_start_matches('[').trim_end_matches(']'))
|
||||||
// This shouldn't *actually* ever happen
|
// this indicates that the IPv6 address is malformed so shouldn't
|
||||||
|
// usually happen, but if it does, just return the original input
|
||||||
.unwrap_or(val)
|
.unwrap_or(val)
|
||||||
} else {
|
} else {
|
||||||
val.split(':').next().unwrap_or(val)
|
val.split(':').next().unwrap_or(val)
|
||||||
|
8
justfile
8
justfile
@ -53,6 +53,14 @@ test-docs toolchain="": && doc
|
|||||||
# Test workspace.
|
# Test workspace.
|
||||||
test-all toolchain="": (test toolchain) (test-docs toolchain)
|
test-all toolchain="": (test toolchain) (test-docs toolchain)
|
||||||
|
|
||||||
|
# Test workspace and generate Codecov coverage file.
|
||||||
|
test-coverage-codecov toolchain="":
|
||||||
|
cargo {{ toolchain }} llvm-cov --workspace {{ all_crate_features }} --codecov --output-path codecov.json
|
||||||
|
|
||||||
|
# Test workspace and generate LCOV coverage file.
|
||||||
|
test-coverage-lcov toolchain="":
|
||||||
|
cargo {{ toolchain }} llvm-cov --workspace {{ all_crate_features }} --lcov --output-path lcov.info
|
||||||
|
|
||||||
# Document crates in workspace.
|
# Document crates in workspace.
|
||||||
doc *args:
|
doc *args:
|
||||||
RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --no-deps --workspace {{ all_crate_features }} {{ args }}
|
RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --no-deps --workspace {{ all_crate_features }} {{ args }}
|
||||||
|
Loading…
Reference in New Issue
Block a user