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>
16 lines
440 B
Bash
Executable File
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"
|