mirror of
https://github.com/Darkrock-Studios/hammer-editor.git
synced 2026-08-05 15:49:46 +00:00
The server test suite now runs against embedded PostgreSQL and takes ~10 minutes per run — too slow to gate every commit. The hook now only runs `desktopTest`. Run `:server:test` manually before pushing, or rely on CI to catch server-side regressions.
17 lines
No EOL
442 B
Bash
Executable file
17 lines
No EOL
442 B
Bash
Executable file
#!/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 |