File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Installation Test
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ - develop
8+ pull_request :
9+ branches :
10+ - master
11+ - develop
12+
13+ jobs :
14+ test-installation :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Docker
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Create Docker services
24+ run : |
25+ docker compose up -d
26+ # Wait for services to be healthy
27+ sleep 30
28+
29+ - name : Check Docker containers status
30+ run : |
31+ # Check if all containers are running
32+ if [ "$(docker compose ps --status running | wc -l)" -lt 2 ]; then
33+ echo "Not all containers are running. Current status:"
34+ docker compose ps
35+ docker compose logs
36+ exit 1
37+ fi
38+
39+ - name : Test Grafana accessibility
40+ run : |
41+ # Wait for Grafana to be ready
42+ timeout 60s bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:3000)" != "200" ]]; do sleep 5; done' || exit 1
43+
44+ - name : Test MQTT broker
45+ run : |
46+ # Install mosquitto-clients for MQTT testing
47+ sudo apt-get update && sudo apt-get install -y mosquitto-clients
48+
49+ # Test MQTT connection
50+ mosquitto_sub -h localhost -p 1883 -t test_topic -C 1 &
51+ mosquitto_pub -h localhost -p 1883 -t test_topic -m "test message"
52+
53+ - name : Cleanup
54+ if : always()
55+ run : docker compose down
You can’t perform that action at this time.
0 commit comments