mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-23 00:13:11 +01:00
fb60841047
Because it's the only tag being built
23 lines
526 B
Bash
Executable File
23 lines
526 B
Bash
Executable File
#!/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'
|
|
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
|
|
echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'."
|
|
fi
|