mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-27 23:06:53 +08:00
fce97176d6
* Updated cython build scripts * Updated setup.py to to install catalyst package * Updated momentum example to use catalyst package * catalyst executable now supports loading pipelines from multiple bundles
34 lines
909 B
Bash
Executable File
34 lines
909 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# An hook script to verify linting and passing unit tests.
|
|
#
|
|
# Called by "git commit" with no arguments. The hook should
|
|
# exit with non-zero status after issuing an appropriate message if
|
|
# it wants to stop the commit.
|
|
#
|
|
# To enable this hook, copy or symlink to your repo's
|
|
# ".git/hooks/pre-commit".
|
|
#
|
|
# Please read the following as it will execute on your machine on each commit.
|
|
|
|
set -e
|
|
|
|
# stash everything that wasn't just staged
|
|
# so that we are only testing the staged code
|
|
stash_result=$(git stash --keep-index)
|
|
|
|
# Run flake8 linting
|
|
flake8 catalyst tests
|
|
# Run unit tests
|
|
nosetests -x
|
|
|
|
# restore unstaged code
|
|
# N.B. this won't run if linting or unit tests fail
|
|
# But if either fail, it's probably best to have only the offending
|
|
# staged commits 'active', anyway.
|
|
stash_result=$(git stash --keep-index)
|
|
if [ "$stash_result" != "No local changes to save" ]
|
|
then
|
|
git stash pop -q
|
|
fi
|