File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ echo " 🔍 Running pre-push checks..."
4+
5+ # Check if pushing a GUI tag
6+ PUSHING_GUI_TAG=$( git tag --points-at HEAD | grep -E " ^v.*-gui$" || true)
7+
8+ # Always run Go tests
9+ echo " 🔨 Running Go tests..."
10+ go test ./cmd/... ./internal/... ./pkg/...
11+ if [ $? -ne 0 ]; then
12+ echo " ❌ Go tests failed!"
13+ exit 1
14+ fi
15+
16+ # Only run frontend tests if pushing GUI tag
17+ if [ -n " $PUSHING_GUI_TAG " ]; then
18+ echo " 📦 GUI tag detected: $PUSHING_GUI_TAG "
19+ echo " 📦 Running frontend tests..."
20+ cd frontend && npm run test:run
21+ if [ $? -ne 0 ]; then
22+ echo " ❌ Frontend tests failed!"
23+ exit 1
24+ fi
25+ cd ..
26+ else
27+ echo " ⏭️ No GUI tag - skipping frontend tests"
28+ fi
29+
30+ echo " ✅ All pre-push checks passed!"
Original file line number Diff line number Diff line change 1111 "test" : " vitest" ,
1212 "test:ui" : " vitest --ui" ,
1313 "test:run" : " vitest run" ,
14- "test:coverage" : " vitest run --coverage"
14+ "test:coverage" : " vitest run --coverage" ,
15+ "prepare" : " husky"
1516 },
1617 "dependencies" : {
1718 "@radix-ui/react-checkbox" : " ^1.3.3" ,
You can’t perform that action at this time.
0 commit comments