Skip to content

Commit cd6238a

Browse files
committed
feat: add a justfile
1 parent 10c34e8 commit cd6238a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

justfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
alias b := build
2+
alias c := check
3+
alias f := fmt
4+
alias t := test
5+
alias p := pre-push
6+
7+
_default:
8+
@just --list
9+
10+
# Build the project
11+
build:
12+
cargo build
13+
14+
# Check code: formatting, compilation, linting, and commit signature
15+
check:
16+
cargo +nightly fmt --all -- --check
17+
cargo check --all-features --all-targets
18+
cargo clippy --all-features --all-targets -- -D warnings
19+
@[ "$(git log --pretty='format:%G?' -1 HEAD)" = "N" ] && \
20+
echo "\n⚠️ Unsigned commit: BDK requires that commits be signed." || \
21+
true
22+
23+
# Format all code
24+
fmt:
25+
cargo +nightly fmt
26+
27+
# Run all tests on the workspace with all features
28+
test:
29+
cargo test --all-features
30+
31+
# Run pre-push suite: format, check, and test
32+
pre-push: fmt check test

0 commit comments

Comments
 (0)