forked from wlkns-dev/stimmwerk
- .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>
9 lines
550 B
Bash
Executable File
9 lines
550 B
Bash
Executable File
#!/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
|