-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
81 lines (66 loc) · 2.51 KB
/
Copy pathjustfile
File metadata and controls
81 lines (66 loc) · 2.51 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
# agent-mesh — task runner
#
# PIPELINE PARITY: This justfile is the local mirror of the CI pipeline
# at .github/workflows/ci.yml and the pre-push hook at .githooks/pre-push.
# When editing any of the three, audit the others in the same PR.
#
# Quick reference:
# just — list available recipes (default)
# just check — full local gate (fmt + clippy + test)
# just cov — local coverage with HTML report
# just cov-ci — coverage with 75% gate, lcov output (CI mode)
# just install-hooks — wire .githooks/ as the repo's hooks path
default:
@just --list
# --- Build ---
# Default debug build for the whole workspace.
build:
cargo build --workspace
# Optimized release build for the whole workspace.
release:
cargo build --workspace --release
# --- Test ---
# Run every test in the workspace.
test:
cargo test --workspace
# --- Lint & format ---
# Apply rustfmt to the whole workspace.
fmt:
cargo fmt --all
# Lint with zero-warnings gate.
lint:
cargo clippy --workspace --all-targets -- -D warnings
# fmt-check, lint, and test — the local equivalent of CI.
# PIPELINE PARITY: must match .github/workflows/ci.yml.
check:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
# --- Coverage ---
# Generate an HTML coverage report for human review.
cov:
cargo llvm-cov --workspace --html
@echo "HTML report at target/llvm-cov/html/index.html"
# CI-mode coverage: emit lcov + enforce the current floor.
# PIPELINE PARITY: must match the coverage job in .github/workflows/ci.yml.
#
# Floor: 75% workspace-wide. Ratchet UP only, never down. Each PR that
# adds tests should bump this threshold higher; each PR that adds
# untested code will fail the gate.
#
# The `pyo3_module.rs` files in each crate are cfg-gated behind the
# `pyo3` cargo feature (default-off), so they don't compile into the
# default-feature test build llvm-cov uses. Excluding them keeps the
# floor honest. The `agent-mesh-py` umbrella crate is similarly
# excluded — its surface is exercised by the Python pytest suite at
# `agent-mesh-py/tests/`.
cov-ci:
cargo llvm-cov --workspace --lcov --output-path lcov.info \
--ignore-filename-regex 'pyo3_module\.rs|agent-mesh-py/' \
--fail-under-lines 75
# --- Hook installation ---
# Point this repo at .githooks/ for pre-push gating.
# Idempotent — safe to re-run.
install-hooks:
git config core.hooksPath .githooks
@echo "core.hooksPath -> .githooks"