21 lines
423 B
Plaintext
Executable File
21 lines
423 B
Plaintext
Executable File
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}linters...${NC}\n"
|
|
npm run lint
|
|
printf "${PURPLE}unit tests...${NC}\n"
|
|
python -Wall manage.py test --noinput
|
|
set +e
|
|
|
|
printf "${PURPLE}Tests passed.${NC}\n" |