Skip to content

Testing Docker image #13

Testing Docker image

Testing Docker image #13

# Github action for testing the Docker image
name: Testing Docker image
on:
workflow_dispatch:
jobs:
test-docker-image:
runs-on: ubuntu-latest
steps:
- name: Testing with docker run
run: |
echo "[LOG] Starting ioBroker Container..."
docker run -d --name iobroker buanet/iobroker:latest
echo "[LOG] Done."
echo ' '
echo "[LOG] Waiting for Startup Script..."
sleep 60
echo "[LOG] Done."
echo ' '
echo "[LOG] Writing Logs..."
docker logs iobroker >& testrun.log
echo "[LOG] Done."
echo ' '
echo "[LOG] Checking Web UI..."
docker exec iobroker curl -s http://localhost:8081 | grep -q '<title>Admin</title>' || { echo "[LOG] Fehler: Web UI nicht erreichbar."; exit 1; }
echo "[LOG] Done."
echo ' '
echo "[LOG] Output testrun.log:"
cat testrun.log
echo ' '
echo "[LOG] Test successful."
echo ' '