- .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
18 lines
638 B
Bash
Executable File
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"
|