Files
synapbus/scripts/hooks/pre-push
T
Algis DumbrisandClaude Opus 4.6 7de0114927 feat: add pre-commit and pre-push git hooks
Pre-commit runs go vet, golangci-lint (optional), and fast tests.
Pre-push runs full test suite and build verification.
Installable via `make hooks`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:17:15 +02:00

16 lines
440 B
Bash
Executable File

#!/usr/bin/env bash
# Pre-push hook: full validation before pushing
set -e
echo "🔍 Pre-push checks..."
# 1. Full test suite
echo " Running full test suite..."
CGO_ENABLED=0 go test -count=1 -timeout 120s ./... || { echo "❌ tests failed"; exit 1; }
# 2. Build verification
echo " Verifying build..."
CGO_ENABLED=0 go build -o /dev/null ./cmd/synapbus/ || { echo "❌ build failed"; exit 1; }
echo "✅ All pre-push checks passed"