forked from Byron/cargo-smart-release
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
executable file
·52 lines (38 loc) · 1.39 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
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env -S just --justfile
# ^ A shebang isn't required, but allows a justfile to be executed
# like a script, with `./justfile test`, for example.
default:
{{ just_executable() }} --list
alias t := test
alias c := check
# run all tests, clippy, including journey tests, try building docs
test: clippy check doc unit-tests journey-tests
# run all tests, without clippy, including journey tests, try building docs (and clear target on CI)
ci-test: journey-tests
clear-target:
cargo clean
# Run cargo clippy on all crates
clippy *clippy-args:
cargo clippy
# Build all code in suitable configurations
check:
cargo check --all
# Run cargo doc on all crates
doc $RUSTDOCFLAGS="-D warnings":
cargo doc --all --no-deps
# run all unit tests
unit-tests:
cargo test --all
cargo-smart-release := `cargo metadata --format-version 1 | jq -r .target_directory` / "debug/cargo-smart-release"
# run journey tests (cargo-smart-release)
journey-tests:
cargo build --bin cargo-smart-release
./tests/journey.sh {{ cargo-smart-release }}
# run various auditing tools to assure we are legal and safe
audit:
cargo deny check advisories bans licenses sources
# run nightly rustfmt for its extra features, but check that it won't upset stable rustfmt
fmt:
cargo +nightly fmt --all -- --config-path rustfmt-nightly.toml
cargo +stable fmt --all -- --check
just --fmt --unstable