netbox-docker/hooks/test

23 lines
526 B
Plaintext
Raw Normal View History

2019-02-01 02:58:07 -06:00
#!/bin/bash
. hooks/common
run_test() {
echo "🐳🐳🐳 Testing '${1}'"
VERSION="${1}" docker-compose run netbox ./manage.py test
docker-compose down -v
echo "🐳🐳🐳 Done testing '${1}'"
}
# test on builds of 'branches'
2019-10-14 17:47:19 -05:00
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
2019-02-01 02:58:07 -06:00
else
echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'."
2019-02-01 02:58:07 -06:00
fi