-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
84 lines (63 loc) · 1.99 KB
/
justfile
File metadata and controls
84 lines (63 loc) · 1.99 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# BitPill — task runner
# Requires: cargo, cargo-llvm-cov, rustfmt, clippy
# Default: check formatting, lint, then run tests with coverage
default: fmt-check lint test
# Build the project
build:
cargo build
# Run the terminal UI
run:
cargo run --release
# Run all tests with coverage
test:
BITPILL_TEST_MODE=1 TERM=dumb ./scripts/check_coverage.sh
# Run tests without coverage (faster, for local development)
test-local:
BITPILL_TEST_MODE=1 TERM=dumb cargo test
# Run tests matching a specific path or name filter
# Examples:
# just test-path src/application/services/create_medication_service.rs
# just test-path services::create_medication
# just test-path create_medication
test-path filter:
./scripts/test_path.sh "{{filter}}"
# Lint (zero warnings enforced)
lint:
cargo clippy -- -D warnings
# Lint fixes (optionally specify files)
lint-fix +files='':
cargo clippy --fix --allow-dirty --allow-staged {{files}}
# Format source files (optionally specify files)
fmt *files:
cargo +nightly fmt {{ files }}
# Check formatting without modifying files
fmt-check:
cargo +nightly fmt --check
# Install required dev tools
tools:
rustup component add rustfmt clippy
cargo install cargo-llvm-cov --locked --force
# Install lefthook for pre-commit hooks
install-hooks:
pipx install lefthook
lefthook install
# Validate workflow files statically (requires actionlint)
lint-workflows:
actionlint -config-file .actionlint.yaml .forgejo/workflows/*.yml
# Remove build artifacts
clean:
cargo clean
# Install the CLI tool globally
install:
cargo install --path . --locked
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
release *args:
./scripts/release.sh {{args}}
release-dry *args:
./scripts/release.sh --dry-run {{args}}
release-alpha *args:
./scripts/release.sh --pre-release alpha {{args}}
release-beta *args:
./scripts/release.sh --pre-release beta {{args}}
release-rc *args:
./scripts/release.sh --pre-release rc {{args}}