-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
70 lines (57 loc) · 2.26 KB
/
justfile
File metadata and controls
70 lines (57 loc) · 2.26 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import '.toolchain/rust.just'
toolchain := ""
_list:
@just --list
# Downgrade dependencies necessary to run MSRV checks/tests.
[private]
downgrade-for-msrv:
cargo update -p=quote --precise=1.0.40 # next ver: 1.60
cargo update -p=syn --precise=2.0.53 # next ver: 1.60
cargo update -p=proc-macro2 --precise=1.0.101 # next ver: 1.60
cargo update -p=unicode-ident --precise=1.0.22 # next ver: 1.71
# Check project
check:
just --unstable --fmt --check
fd --hidden --extension=md --extension=yml --exec-batch prettier --check
fd --hidden --extension=toml --exec-batch taplo format --check
fd --hidden --extension=toml --exec-batch taplo lint
cargo +nightly fmt -- --check
cargo shear
# Format project
fmt:
just --unstable --fmt
nixpkgs-fmt .
fd --hidden --extension=md --extension=yml --exec-batch prettier --write
fd --hidden --extension=toml --exec-batch taplo format
cargo +nightly fmt
# Lint workspace with Clippy
clippy:
cargo clippy --workspace --no-default-features
cargo clippy --workspace
# cargo clippy --workspace --all-features
# Test workspace without generating coverage files
[private]
test-no-coverage:
cargo {{ toolchain }} nextest run --workspace --no-default-features
# cargo {{ toolchain }} nextest run --workspace --all-features
cargo {{ toolchain }} test --doc --workspace
# cargo {{ toolchain }} test --doc --workspace --all-features
RUSTDOCFLAGS="-D warnings" cargo {{ toolchain }} doc --workspace --no-deps --all-features
# Test workspace and generate coverage files
test: test-no-coverage
# @just test-coverage-codecov
# @just test-coverage-lcov
# Test workspace using MSRV
test-msrv: downgrade-for-msrv test
# Test workspace and generate Codecov coverage file
test-coverage-codecov:
cargo {{ toolchain }} llvm-cov --workspace --all-features --codecov --output-path codecov.json
# Test workspace and generate LCOV coverage file
test-coverage-lcov:
cargo {{ toolchain }} llvm-cov --workspace --all-features --lcov --output-path lcov.info
# Document workspace
doc *args:
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --all-features {{ args }}
# Document workspace and watch for changes
doc-watch: (doc "--open")
cargo watch -- just doc