Files
lilygo-t-deck/.githooks/pre-commit
T
Dejvino c80fcc609b 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
2026-11-14 15:07:47 +01:00

18 lines
638 B
Bash
Executable File

#!/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"