-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjustfile
79 lines (65 loc) · 1.63 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
set dotenv-load
# List all just receipes
default:
@just --list
# Install require tools
requirements:
@echo "Install Rust nightly for formatting"
rustup toolchain add nightly
@echo "Install cargo-nextest to run test"
cargo install cargo-nextest
@echo "Install cargo-nextest for tdd"
cargo install cargo-watch
@echo "Install cargo-audit for audit"
cargo install cargo-audit
@echo "Install cargo-deny for audit"
cargo install cargo-deny
@echo "Install bat"
cargo install bat
@echo "Install cargo-smart-release for release"
cargo install cargo-smart-release
# Run TDD mode
tdd:
cargo watch -c -s "just check"
# Help of the application
help:
cargo run --quiet -- --help
# Launch tests
test:
@echo "🧪 Testing..."
cargo nextest run
cargo test --doc
# Format the code
format:
cargo +nightly fmt
cargo sort --workspace --grouped
# Format the code
lint:
@echo "🎩 Linting..."
cargo check --all --all-features
cargo clippy --all --all-features
# Check the code (formatting, lint, and tests)
check:
@echo "🦀 Check formatting..."
cargo +nightly fmt --all -- --check
cargo sort --workspace --grouped --check
@just lint
@just test
# Audit (security issue, licences)
audit:
@echo "🚨 Audit CVE..."
cargo audit
@echo "🪪 Check licences..."
cargo deny check
# Build in production mode
build:
cargo build --release
# Build the documentation
doc:
cargo doc
# Install to the cargo bin path
install:
cargo install --path .
# Release
# release *ARGS:
# cargo smart-release --update-crates-index gitmoji-rs {{ARGS}}