Skip to content
Snippets Groups Projects
Commit 62e03ae4 authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'pre-push-hook' into 'master'

Pre-push hook

See merge request !36
parents bd672752 edf5ca18
Branches
Tags
1 merge request!36Pre-push hook
Pipeline #17397 passed with stages
in 4 minutes
...@@ -3,4 +3,4 @@ max-line-length=120 ...@@ -3,4 +3,4 @@ max-line-length=120
exclude=pystencils/jupyter.py, exclude=pystencils/jupyter.py,
pystencils/plot.py pystencils/plot.py
pystencils/session.py pystencils/session.py
ignore = W293 W503 W291 ignore = W293 W503 W291 C901
pre-push 0 → 100755
#!/usr/bin/env bash
# Checks run before every push
# has to be copied to .git/hooks
echo "Running pre-push hook"
echo "Running flak8 check"
flake8 --append-config=.flake8 pystencils
# $? stores exit value of the last command
if [ $? -ne 0 ]; then
echo "flake8 failed"
exit 1
fi
python3 setup.py quicktest
# $? stores exit value of the last command
if [ $? -ne 0 ]; then
echo "quicktest failed"
exit 1
fi
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment