Rename pre-commit to pre-push

This commit is contained in:
Jan Tuomi
2018-01-25 22:36:38 +02:00
parent cf50050eba
commit c671206e8a
3 changed files with 6 additions and 7 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
PURPLE='\033[0;35m'
NC='\033[0m' # No Color
. "${VIRTUAL_ENV}/bin/activate"
if [ $? -ne 0 ]
then
printf "${PURPLE}Failed to find virtualenv. Skipping pre-push hook.\n${NC}"
exit 0
fi
set -e
printf "${PURPLE}Running pre-push tests.${NC}\n"
printf "${PURPLE}npm tests...${NC}\n"
npm test
printf "${PURPLE}pycodestyle tests...${NC}\n"
pycodestyle .
printf "${PURPLE}unit tests...${NC}\n"
python manage.py test --noinput
set +e
printf "${PURPLE}Tests passed.${NC}\n"