-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
139 lines (111 loc) · 4.35 KB
/
Copy pathjustfile
File metadata and controls
139 lines (111 loc) · 4.35 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# justfile for oy-cli — deterministic audit/review evidence preparation and agent skills
#
# Run `just` or `just --list` to see available recipes.
#
# Quick start:
# just dev # fast checks (fmt + cargo check)
# just check # standard local checks plus the mdBook site
# just docs # build the mdBook site into book/
# just fix # auto-fix formatting and clippy lints, then check
# just run -- --help
#
# Requires: cargo, rustc >= 1.96, just, and mdbook. `mise install`
# provides them. The extended suite also requires cargo-nextest and nightly Miri.
_default:
@just --list
# === Development checks ===
# Fast development check: format + cargo check (no recompilation across subcommands).
dev: _fmt-check
cargo check --locked
# Local install from checkout (no mise/XDG isolation): build, install to ~/.cargo/bin, refresh skills.
install:
cargo install --path . --locked
mkdir -p ~/.local/bin && ln -sf ~/.cargo/bin/oy ~/.local/bin/oy
oy setup
oy doctor --check
@echo "Installed oy $(~/.cargo/bin/oy --version) — skills at ~/.agents/skills — run 'oy doctor --check' and ask your agent to run the oy-setup skill"
# Standard local check suite. Uses stable Cargo only so it works after `mise install`.
check: _version-check _fmt-check _clippy _test _rustdoc _book _help-smoke _installer-smoke _shellcheck _deny
@echo "✓ local checks passed"
# Extended local suite using CI's nextest and Miri runners.
ci: _version-check _fmt-check _clippy _nextest _miri _rustdoc _book _help-smoke _installer-smoke _shellcheck _deny
@echo "✓ extended checks passed"
# Auto-format, apply clippy suggestions, update lockfile, then run the local suite.
fix: _fmt _clippy-fix
cargo update --workspace
@just check
# Build user/contributor documentation into book/.
docs: _book
# === Individual checks (available as standalone targets) ===
# Check formatting (no changes).
_fmt-check:
cargo fmt --check
# Apply formatting in-place.
_fmt:
cargo fmt
# Run clippy with deny-warnings.
_clippy:
cargo clippy --all-targets --locked -- -D warnings
# Auto-apply clippy fixes.
_clippy-fix:
cargo clippy --all-targets --locked --fix --allow-dirty --allow-staged
# Run all non-doc tests with stable Cargo, then run rustdoc examples/tests.
_test:
cargo test --all-targets --locked
cargo test --doc --locked
# Run non-doc tests with nextest, then rustdoc tests.
_nextest:
cargo nextest run --all-targets --locked --profile ci
cargo test --doc --locked
# Run focused smoke tests under Miri on nightly to catch undefined behavior.
_miri:
cargo +nightly miri test --locked miri_smoke
# Build docs with deny-warnings (no deps).
_rustdoc:
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked
# Build the mdBook user/contributor site.
_book:
rm -rf book
mdbook build
cp docs/install.sh book/install.sh
sh -n book/install.sh
test -f book/index.html
test -f book/getting-started.html
test -f book/reference.html
# Smoke-test the CLI help output.
_help-smoke:
cargo run --locked -- --help
cargo run --locked -- setup --help
cargo run --locked -- audit --help
cargo run --locked -- audit prepare --help
cargo run --locked -- audit finalize --help
cargo run --locked -- review --help
cargo run --locked -- review prepare --help
cargo run --locked -- review finalize --help
cargo run --locked -- doctor --help
cargo run --locked -- upgrade --help
# Exercise installer sequencing and pins with a fake mise executable.
_installer-smoke:
sh scripts/test_install.sh
# Lint the shell scripts with shellcheck.
_shellcheck:
shellcheck docs/install.sh scripts/test_install.sh
# Check RustSec advisories, yanked crates, and dependency licenses.
_deny:
cargo deny check advisories licenses bans
# Check release-facing version pins against Cargo.toml.
_version-check:
python3 scripts/check_versions.py
# === Release preparation ===
# Bump every release-facing version pin to a new version, then verify alignment.
# Usage: just release 0.14.10
release version:
@python3 scripts/bump_version.py {{version}}
@python3 scripts/check_versions.py
# Verify the crate can be packaged for publishing.
package:
cargo package --locked
# === Run the binary ===
# Run oy with arguments. Example: just run -- doctor
run *args:
cargo run --locked -- {{args}}