Skip to content

Commit

Permalink
Add RabbitMQ as test broker (#62)
Browse files Browse the repository at this point in the history
* Add RabbitMQ as test broker

* Switch to released namoshek/rabbitmq-github-action
  • Loading branch information
Namoshek authored Jan 10, 2021
1 parent b155078 commit ca47fff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .ci/rabbitmq.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
listeners.tcp.default = 5672
loopback_users.guest = false

mqtt.listeners.tcp.default = 1883
mqtt.listeners.ssl = none
mqtt.allow_anonymous = true
mqtt.default_user = guest
mqtt.default_pass = guest
mqtt.vhost = /
mqtt.exchange = amq.topic
mqtt.subscription_ttl = 1800000
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
php-version: ['7.4', '8.0']
mqtt-broker: ['mosquitto', 'hivemq', 'emqx']
mqtt-broker: ['mosquitto', 'hivemq', 'emqx', 'rabbitmq']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -85,6 +85,15 @@ jobs:
version: '4.2.5'
ports: '1883:1883'

- name: Start RabbitMQ message broker
if: matrix.mqtt-broker == 'rabbitmq'
uses: namoshek/rabbitmq-github-action@v1
with:
version: '3.8.9'
ports: '1883:1883'
config: ${{ github.workspace }}/.ci/rabbitmq.conf
plugins: 'rabbitmq_mqtt'

- name: Wait a bit until MQTT broker has started
run: sleep 30

Expand All @@ -95,7 +104,7 @@ jobs:
MQTT_BROKER_PORT: 1883
MQTT_BROKER_TLS_PORT: 8883
MQTT_BROKER_TLS_WITH_CLIENT_CERT_PORT: 8884
SKIP_TLS_TESTS: ${{ matrix.mqtt-broker == 'emqx' }}
SKIP_TLS_TESTS: ${{ matrix.mqtt-broker == 'emqx' || matrix.mqtt-broker == 'rabbitmq' }}

- name: Dump Docker logs on failure
if: failure()
Expand Down

0 comments on commit ca47fff

Please sign in to comment.