2022-10-04 19:10:06 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-12-29 00:22:53 +01:00
|
|
|
version="$1"
|
|
|
|
if [ $version ]
|
|
|
|
then
|
|
|
|
versions=("$version")
|
|
|
|
else
|
2023-05-19 13:49:36 +02:00
|
|
|
versions=(1.21.3)
|
2022-12-29 00:22:53 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
for version in ${versions[*]}
|
2022-10-04 19:10:06 +02:00
|
|
|
do
|
|
|
|
echo "Starting uptime kuma $version..."
|
|
|
|
docker run -d -it --rm -p 3001:3001 --name uptimekuma "louislam/uptime-kuma:$version" > /dev/null
|
|
|
|
|
|
|
|
while [[ "$(curl -s -L -o /dev/null -w ''%{http_code}'' 127.0.0.1:3001)" != "200" ]]
|
|
|
|
do
|
2022-11-05 18:48:59 +01:00
|
|
|
sleep 0.5
|
2022-10-04 19:10:06 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
echo "Running tests..."
|
|
|
|
python -m unittest discover -s tests
|
|
|
|
|
|
|
|
echo "Stopping uptime kuma..."
|
|
|
|
docker stop uptimekuma > /dev/null
|
|
|
|
|
|
|
|
echo ''
|
|
|
|
done
|