From 671ae5bc4a657136b22a9ad36122f389f02107ef Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Wed, 23 Jan 2019 22:10:51 -0500 Subject: [PATCH] running tests before every pip deploy --- bin/deploy_pip.sh | 19 ++++++++++++------- bin/run_tests.sh | 6 +++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/bin/deploy_pip.sh b/bin/deploy_pip.sh index c5eea2d..f35a461 100755 --- a/bin/deploy_pip.sh +++ b/bin/deploy_pip.sh @@ -6,13 +6,18 @@ cd .. ./bin/clean.sh -python setup.py sdist bdist_wheel -git add . -git commit -git push +if ./bin/run_tests.sh; then + python setup.py sdist bdist_wheel -git tag $(cat .version) -git push -u origin $(cat .version) + git add . + git commit + git push -twine upload dist/* \ No newline at end of file + git tag $(cat .version) + git push -u origin $(cat .version) + + twine upload dist/* +else + echo ">>> Stopped due to test failure!" +fi diff --git a/bin/run_tests.sh b/bin/run_tests.sh index b7d45aa..9e34f4f 100755 --- a/bin/run_tests.sh +++ b/bin/run_tests.sh @@ -5,5 +5,9 @@ cd $WK_DIR cd .. for filename in ./tests/test*.py; do - python $filename + if python $filename ; then + echo woohoo + else + exit 1 + fi done \ No newline at end of file