#!/bin/bash # Change to the root directory of your project #cd /path/to/your/project/root # Run fast test suites. `:server:test` is excluded because the embedded # PostgreSQL make it too slow for every commit. ./gradlew desktopTest # Check the exit code of the test task if [ $? -ne 0 ]; then echo "Error: tests failed. Please fix the failing tests before committing." exit 1 fi # If the tests pass, allow the commit to proceed exit 0