Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

echo "🔍 Running pre-commit checks..."

# Quick web lint only (full checks on pre-push)
cd apps/web && npm run lint
if [ $? -ne 0 ]; then
echo "❌ Lint failed. Commit aborted."
exit 1
fi

echo "✅ Pre-commit checks passed!"
44 changes: 44 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/sh

echo "🔍 Running pre-push checks..."

# Web checks
echo "📦 Web: Running lint..."
cd apps/web && npm run lint
if [ $? -ne 0 ]; then
echo "❌ Web lint failed. Push aborted."
exit 1
fi

echo "🔨 Web: Building..."
npm run build
if [ $? -ne 0 ]; then
echo "❌ Web build failed. Push aborted."
exit 1
fi

cd ../..

# API checks
echo "☕ API: Running checkstyle..."
cd apps/api && ./mvnw checkstyle:check -q
if [ $? -ne 0 ]; then
echo "❌ API checkstyle failed. Push aborted."
exit 1
fi

echo "🧪 API: Running tests..."
./mvnw test -Dquarkus.test.continuous-testing=disabled -q
if [ $? -ne 0 ]; then
echo "❌ API tests failed. Push aborted."
exit 1
fi

echo "🔨 API: Building..."
./mvnw package -DskipTests -q
if [ $? -ne 0 ]; then
echo "❌ API build failed. Push aborted."
exit 1
fi

echo "✅ All pre-push checks passed!"
Loading