forked from robjtede/actix-web-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
40 lines (33 loc) · 1.46 KB
/
justfile
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
36
37
38
39
40
_list:
@just --list
# Run tests on all crates in workspace using its MSRV.
test-msrv:
@just test +1.70.0
# Run tests on all crates in workspace using specified (or default) toolchain.
test toolchain="":
cargo {{ toolchain }} hack --workspace test --no-fail-fast --no-default-features
cargo {{ toolchain }} hack --workspace test --no-fail-fast
cargo {{ toolchain }} hack --workspace test --no-fail-fast --all-features
# Run tests on all crates in workspace and produce coverage file (Codecov format).
test-coverage-codecov toolchain="":
cargo {{ toolchain }} llvm-cov --workspace --all-features --codecov --output-path codecov.json
# Run tests on all crates in workspace and produce coverage file (lcov format).
test-coverage-lcov toolchain="":
cargo {{ toolchain }} llvm-cov --workspace --all-features --lcov --output-path lcov.info
# Check project formatting.
check:
just --unstable --fmt --check
npx -y prettier --check $(fd --type=file --hidden -e=md -e=yml)
taplo lint
cargo +nightly fmt -- --check
# Format project.
fmt:
just --unstable --fmt
nix fmt
npx -y prettier --write $(fd --type=file --hidden -e=md -e=yml)
taplo format
cargo +nightly fmt
# Build rustdoc for all crates in workspace and watch for changes.
doc-watch:
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --all-features --open
cargo watch -- RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --all-features