Update pre-commit script
This commit is contained in:
+14
-7
@@ -1,17 +1,24 @@
|
||||
. "VIRTUALENV_ACTIVATE"
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to source virtualenv. Skipping pre-commit hook."
|
||||
exit 0;
|
||||
fi
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
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-commit hook.\n${NC}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
printf "${PURPLE}Running pre-commit 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user