mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-08 16:34:45 +08:00
chore: make sure to run tests before pushing to master
This commit is contained in:
parent
57ff186f91
commit
16b794412b
1 changed files with 11 additions and 0 deletions
11
.husky/pre-push
Normal file
11
.husky/pre-push
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
if [ $(git branch --no-color | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') = "master" ] && [ $(git remote get-url origin) = "https://github.com/monkeytypegame/monkeytype" ]; then
|
||||
echo "Running tests before pushing to master..."
|
||||
npm run test
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Tests failed, aborting push."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue