Skip to content

Commit

Permalink
fix(githooks): include tests in the pre-push script
Browse files Browse the repository at this point in the history
  • Loading branch information
sobakavosne committed Nov 4, 2024
1 parent 94bf2e8 commit 5106fcb
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,26 @@ fi

echo ""
echo "======================================"
echo "Code format check passed. Proceeding with push."
echo "Code format check passed. Running tests."
echo "======================================"
echo ""

sbt test

TEST_EXIT_CODE=$?

if [ $TEST_EXIT_CODE -ne 0 ]; then
echo ""
echo "======================================"
echo "Tests failed. Please fix the issues before pushing."
echo "======================================"
echo ""
exit 1
fi

echo ""
echo "======================================"
echo "All tests passed. Proceeding with push."
echo "======================================"
echo ""
exit 0

0 comments on commit 5106fcb

Please sign in to comment.