diff --git a/README.md b/README.md index 783692a..6b4ad9c 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Each blueprint recipe follows the same seven sections: Purpose, Inputs, Flow, Bo ## Contributor validation -Run these checks from the repository root with Python 3.10+ and the Gitleaks 8.30.1 binary available locally: +Run `just check` before opening a PR; it runs the same checks as CI. It requires [`just`](https://just.systems), Python 3.10+, and the Gitleaks 8.30.1 binary on `PATH` or in `GITLEAKS_BINARY`. `just test` runs only the tests. The underlying commands, run from the repository root: ```sh python3 scripts/check_docs.py diff --git a/justfile b/justfile new file mode 100644 index 0000000..c526a30 --- /dev/null +++ b/justfile @@ -0,0 +1,21 @@ +# Validation entrypoint; mirrors .github/workflows/ci.yml. Needs Python 3.10+ and Gitleaks 8.30.1. +export GITLEAKS_BINARY := env("GITLEAKS_BINARY", `command -v gitleaks || true`) +export PYTHONDONTWRITEBYTECODE := "1" + +# List available recipes +default: + @just --list + +# Run everything CI runs: tests, docs validation, working-tree and history secret scans +check: _require-gitleaks test + python3 scripts/check_docs.py + python3 scripts/check_secrets.py --working-tree + python3 scripts/check_secrets.py --history + +# Run the standard-library tests, including native Gitleaks canaries +test: _require-gitleaks + python3 -m unittest discover -s tests -v + +[private] +_require-gitleaks: + @test -x "$GITLEAKS_BINARY" || { echo "Gitleaks 8.30.1 not found: put it on PATH or set GITLEAKS_BINARY" >&2; exit 1; }