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:
@@ -7,8 +7,11 @@
|
||||
# unit + integration (fast, deterministic)
|
||||
# + E2E journeys (separate build, real loop(),
|
||||
# ~1-2 min wall time)
|
||||
# make netdeck-test-unit fast layer only
|
||||
# make netdeck-test-unit fast layer only (unit + integration, seconds) —
|
||||
# also what the pre-commit hook runs
|
||||
# make netdeck-test-e2e E2E layer only
|
||||
# make hooks enable the pre-commit hook for this clone
|
||||
# (= git config core.hooksPath .githooks)
|
||||
#
|
||||
# Firmware builds need platformio: either `pio` on PATH or the default
|
||||
# ~/.platformio/penv/bin/pio install.
|
||||
@@ -37,4 +40,10 @@ netdeck-test-unit:
|
||||
netdeck-test-e2e:
|
||||
$(MAKE) --no-print-directory -C emulator APP=NetDeck test-e2e
|
||||
|
||||
.PHONY: netdeck netdeck-test netdeck-test-unit netdeck-test-e2e
|
||||
# install the pre-commit hook into this clone (hooks are not versioned in
|
||||
# .git/hooks; the repo ships them under .githooks/ instead)
|
||||
hooks:
|
||||
git config core.hooksPath .githooks
|
||||
@echo "pre-commit hook enabled: make netdeck-test-unit runs before every commit"
|
||||
|
||||
.PHONY: netdeck netdeck-test netdeck-test-unit netdeck-test-e2e hooks
|
||||
|
||||
Reference in New Issue
Block a user