Add pre-commit test gate + AGENTS.md
- .githooks/pre-commit: runs 'make netdeck-test-unit' (fast layer: unit + integration) before every commit; bypass with --no-verify - make hooks: enables the hook for a clone (core.hooksPath .githooks) - AGENTS.md: toolchain, one-command build/test entry points, hook install instructions, commit discipline
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# Pre-commit gate for the T-Deck workspace: run the fast headless test layer
|
||||
# (unit + integration, deterministic, seconds) before every commit, so a
|
||||
# regression can never land silently.
|
||||
#
|
||||
# skip once: git commit --no-verify
|
||||
# disable: git config --unset core.hooksPath
|
||||
# (re)install: make hooks
|
||||
|
||||
echo "[pre-commit] running fast tests (make netdeck-test-unit)..."
|
||||
make netdeck-test-unit || {
|
||||
echo "" >&2
|
||||
echo "[pre-commit] FAST TESTS FAILED - commit aborted." >&2
|
||||
echo " Fix the failures above, or bypass once with: git commit --no-verify" >&2
|
||||
exit 1
|
||||
}
|
||||
echo "[pre-commit] fast tests OK"
|
||||
Reference in New Issue
Block a user