Skip to content

Replace operating system with environment #159

Replace operating system with environment

Replace operating system with environment #159

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-mosquitto:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start Mosquitto service using Docker Compose
run: docker-compose up -d mosquitto
- name: Wait for Mosquitto to be healthy
run: |
for i in {1..10}; do
if docker inspect --format='{{.State.Status}}' mosquitto | grep -q running; then
echo "Mosquitto is running"
exit 0
else
echo "Waiting for Mosquitto to be healthy..."
sleep 10
fi
done
echo "Mosquitto did not become healthy in time"
exit 1
- name: Stop Mosquitto service using Docker Compose
run: docker-compose down