forked from wlkns-dev/stimmwerk
CI: Gitea-Workflow, Pre-Push-Hook und Runner-Compose
- .gitea/workflows/ci.yml: Format, Clippy (Warnungen als Fehler) und Tests bei Pull-Anfragen und Push auf main - .githooks/pre-push: dieselbe Prüfung lokal (einschaltbar, überspringbar) - tools/ci-runner: Compose-Datei für act_runner (Token nur in der lokalen .env, Ressourcen über config.yaml begrenzt) - .gitignore: .env, Runner-Daten und -Konfiguration bleiben lokal Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
8
.githooks/pre-push
Executable file
8
.githooks/pre-push
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Prüft vor jedem Push, was auch die CI prüft: Format, Clippy, Tests. Überspringen: SKIP_CHECKS=1 git push
|
||||
# Einschalten (einmal pro Klon): git config core.hooksPath .githooks
|
||||
[ -n "$SKIP_CHECKS" ] && exit 0
|
||||
cd "$(git rev-parse --show-toplevel)" || exit 1
|
||||
echo "pre-push: cargo fmt --check"; cargo fmt --check || { echo "→ Format: bitte 'cargo fmt' ausführen"; exit 1; }
|
||||
echo "pre-push: cargo clippy"; cargo clippy --all-targets --locked -- -D warnings || exit 1
|
||||
echo "pre-push: cargo test"; cargo test --locked || exit 1
|
||||
Reference in New Issue
Block a user