pre-commit: run tests instead of just build

Changed files
+3 -3
.githooks
+3 -3
.githooks/pre-commit
··· 1 1 #!/bin/sh 2 - # check formatting and build before commit 2 + # check formatting, build, and test before commit 3 3 4 4 zig fmt --check src/ build.zig 2>/dev/null 5 5 if [ $? -ne 0 ]; then ··· 7 7 exit 1 8 8 fi 9 9 10 - zig build 2>/dev/null 10 + zig build test 2>/dev/null 11 11 if [ $? -ne 0 ]; then 12 - echo "zig build failed." 12 + echo "zig build test failed." 13 13 exit 1 14 14 fi