Skip to content

Commit ca47fff

Browse files
authored
Add RabbitMQ as test broker (#62)
* Add RabbitMQ as test broker * Switch to released namoshek/rabbitmq-github-action
1 parent b155078 commit ca47fff

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.ci/rabbitmq.conf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
listeners.tcp.default = 5672
2+
loopback_users.guest = false
3+
4+
mqtt.listeners.tcp.default = 1883
5+
mqtt.listeners.ssl = none
6+
mqtt.allow_anonymous = true
7+
mqtt.default_user = guest
8+
mqtt.default_pass = guest
9+
mqtt.vhost = /
10+
mqtt.exchange = amq.topic
11+
mqtt.subscription_ttl = 1800000

.github/workflows/tests.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
php-version: ['7.4', '8.0']
19-
mqtt-broker: ['mosquitto', 'hivemq', 'emqx']
19+
mqtt-broker: ['mosquitto', 'hivemq', 'emqx', 'rabbitmq']
2020

2121
steps:
2222
- uses: actions/checkout@v2
@@ -85,6 +85,15 @@ jobs:
8585
version: '4.2.5'
8686
ports: '1883:1883'
8787

88+
- name: Start RabbitMQ message broker
89+
if: matrix.mqtt-broker == 'rabbitmq'
90+
uses: namoshek/rabbitmq-github-action@v1
91+
with:
92+
version: '3.8.9'
93+
ports: '1883:1883'
94+
config: ${{ github.workspace }}/.ci/rabbitmq.conf
95+
plugins: 'rabbitmq_mqtt'
96+
8897
- name: Wait a bit until MQTT broker has started
8998
run: sleep 30
9099

@@ -95,7 +104,7 @@ jobs:
95104
MQTT_BROKER_PORT: 1883
96105
MQTT_BROKER_TLS_PORT: 8883
97106
MQTT_BROKER_TLS_WITH_CLIENT_CERT_PORT: 8884
98-
SKIP_TLS_TESTS: ${{ matrix.mqtt-broker == 'emqx' }}
107+
SKIP_TLS_TESTS: ${{ matrix.mqtt-broker == 'emqx' || matrix.mqtt-broker == 'rabbitmq' }}
99108

100109
- name: Dump Docker logs on failure
101110
if: failure()

0 commit comments

Comments
 (0)