ADDED - test gate: pre-push hook, copy-paste summary, make targets, mandatory-tests rule, CI test step

This commit is contained in:
MOH
2026-08-06 20:03:37 +02:00
parent 9c40d9030f
commit e377877e7e
5 changed files with 150 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# Pre-push test gate. The deploy server only ever PULLS, so the real place to
# stop broken code is right here — before anything leaves this machine.
#
# The suite needs no external database: integration tests spin up an in-process
# PGlite database per worker (see tests/helpers/integration-setup.ts), so
# `npm test` runs standalone. A real failure blocks the push; the run ends with a
# compact copy-pasteable summary (scripts/test-summary.mjs).
#
# Install once: git config core.hooksPath .githooks
# Emergency skip: git push --no-verify
#
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
echo "▶ pre-push: running the full test suite…"
node scripts/test-summary.mjs
echo "✓ all tests green — pushing."