summaryrefslogtreecommitdiff
path: root/.githooks/pre-push
blob: daf4be4d5236a4c163e05ee8bb7ea1e1688b36a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
# Pre-push hook - run tests before pushing

set -e

echo "🧪 Running tests before push..."

# Run the full test suite
go test ./...

if [ $? -eq 0 ]; then
    echo "✅ All tests passed! Push allowed."
    exit 0
else
    echo "❌ Tests failed! Push blocked."
    echo "Fix the failing tests before pushing."
    exit 1
fi