Testing Docker image #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 ' ' |