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