Only test 'latest' in PRs
Because it's the only tag being built
This commit is contained in:
parent
0f4a872082
commit
fb60841047
21
hooks/test
21
hooks/test
|
@ -2,14 +2,21 @@
|
||||||
|
|
||||||
. hooks/common
|
. hooks/common
|
||||||
|
|
||||||
# test 'branches' and 'this' (i.e. pull request) builds
|
run_test() {
|
||||||
if [ "${BUILD}" == "branches" ] \
|
echo "🐳🐳🐳 Testing '${1}'"
|
||||||
|| [ "${BUILD}" == "this" ] \
|
VERSION="${1}" docker-compose run netbox ./manage.py test
|
||||||
|| [ "${DEBUG}" == "true" ]; then
|
|
||||||
echo "🐳🐳🐳 Testing"
|
|
||||||
VERSION=latest docker-compose run netbox ./manage.py test
|
|
||||||
VERSION=snapshot docker-compose run netbox ./manage.py test
|
|
||||||
docker-compose down -v
|
docker-compose down -v
|
||||||
|
echo "🐳🐳🐳 Done testing '${1}'"
|
||||||
|
}
|
||||||
|
|
||||||
|
# test on builds of 'branches'
|
||||||
|
if [ "${BUILD}" == "branches" ] \
|
||||||
|
|| [ "${DEBUG}" == "true" ]; then
|
||||||
|
run_test latest
|
||||||
|
run_test snapshot
|
||||||
|
# test on bulds of 'this' (i.e. pull request)
|
||||||
|
elif [ "${BUILD}" == "this" ]; then
|
||||||
|
run_test latest
|
||||||
else
|
else
|
||||||
echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'."
|
echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue