ci: pre-push-Hook + Installer für lokalen Test-Gate

scripts/git-hooks/pre-push lässt pytest vor jedem Push laufen und bricht
bei roten Tests ab — automatischer Regressionsschutz ohne Forgejo-Runner.
scripts/install-hooks.sh installiert die versionierten Hooks nach .git/hooks
(das selbst nicht versioniert ist). In DEPLOYMENT.md Teil 4.0 dokumentiert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-06-25 00:58:09 +02:00
commit 7a0cf0abb4
3 changed files with 53 additions and 0 deletions

17
scripts/install-hooks.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Installiert die versionierten Git-Hooks aus scripts/git-hooks/ nach .git/hooks/.
# Nach jedem frischen Clone einmal ausfuehren: bash scripts/install-hooks.sh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
SRC="$ROOT/scripts/git-hooks"
DST="$ROOT/.git/hooks"
mkdir -p "$DST"
for hook in "$SRC"/*; do
name="$(basename "$hook")"
cp "$hook" "$DST/$name"
chmod +x "$DST/$name"
echo "✓ installiert: $name"
done
echo "Fertig. Hooks aktiv unter $DST"