-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature-acl
- Loading branch information
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
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 |
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