From d0c9dfe2e5c6839ca5ad762afb5aff94bf9d4dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Thu, 10 Oct 2019 14:08:31 +0200 Subject: [PATCH] Try to get PR builds working --- hooks/common | 4 ++++ hooks/test | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hooks/common b/hooks/common index 7f60a7c..26add15 100755 --- a/hooks/common +++ b/hooks/common @@ -30,6 +30,10 @@ run_build() { # shellcheck disable=SC2068 ./build-branches.sh $@ ;; + this) # Pull Requests + # build all branches, but never push + ./build-branches.sh + ;; *) echo "🚨 Unrecognized build '$BUILD'." diff --git a/hooks/test b/hooks/test index 9ef0d8a..14ad88f 100755 --- a/hooks/test +++ b/hooks/test @@ -2,13 +2,13 @@ . hooks/common -if [ "${BUILD}" == "BRANCHES" ]; then +# test 'branches' and 'this' (i.e. pull request) builds +if [ "${BUILD}" == "branches" ] || [ "${BUILD}" == "this" ]; then echo "🐳🐳🐳 Testing" export DOCKER_TARGET="main" - docker-compose pull --parallel - docker-compose build docker-compose run netbox ./manage.py test + docker-compose down -v else echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'." fi