-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbb.edn
35 lines (35 loc) · 2.59 KB
/
bb.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{:tasks
{:requires ([babashka.fs :as fs])
clean {:doc "Removes target folder"
:task (fs/delete-tree "target")}
test_all_features (shell "cargo test --all-features --no-fail-fast")
test_no_default_features (shell "cargo test --features std --no-default-features --no-fail-fast")
test-examples (shell "cargo test --examples")
cargo-test {:doc "Runs all cargo tests"
:depends [test_all_features test_no_default_features test-examples]}
cargo-fmt {:doc "Checks cargo fmt"
:task (shell "cargo fmt --check")}
cargo-clippy-all-features {:doc "Cargo clippy with all features"
:task (shell "cargo clippy --all-features -- --deny warnings")}
cargo-clippy-no-defaults {:doc "Cargo clippy with no default features"
:task (shell "cargo clippy --no-default-features -- --deny warnings")}
cargo-clippy-examples {:doc "Cargo clippy on examples"
:task (shell "cargo clippy --examples -- --deny warnings -A clippy::unwrap-used")}
clippy {:doc "Runs all variations of cargo clippy"
:depends [cargo-clippy-all-features cargo-clippy-no-defaults cargo-clippy-examples]}
cov-all-features {:doc "Coverage, all features"
:task (shell "cargo llvm-cov --no-report --all-features")}
cov-std-only {:doc "Coverage, std only"
:task (shell "cargo llvm-cov --no-report --no-default-features --features std")}
cov-examples {:doc "Coverage, examples"
:task (shell "cargo llvm-cov --no-report --examples")}
cov-clean {:doc "Cleans all .profraw files and generated html"
:task (shell "cargo llvm-cov clean --workspace")}
cov-html {:doc "Runs llvm-cov to generate human readable html"
:depends [cov-clean cov-all-features cov-std-only cov-examples]
:task (shell "cargo llvm-cov report --html")}
cov {:doc "Generates coverage and reports to the terminal"
:depends [cov-clean cov-all-features cov-std-only cov-examples]
:task (shell "cargo llvm-cov report")}
test {:doc "Runs all tests and checks"
:depends [cargo-test cargo-fmt clippy]}}}