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:
Dejvino
2026-11-14 15:07:47 +01:00
parent a1d0730124
commit c80fcc609b
3 changed files with 62 additions and 2 deletions
+17
View File
@@ -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"