sudo: false

language: php

php:
  - 7.1
  - 7.2

addons:
    apt:
        packages:
            - rabbitmq-server

services:
    - rabbitmq

before_install:
    - rabbitmq-plugins enable rabbitmq_management
    - composer self-update --stable --no-interaction

before_script:
    - composer install --prefer-source --no-interaction

script:
    - php rabbit vhost:reset my_vhost_name -p guest
    - php rabbit vhost:mapping:create examples/events.yml -p guest
    - vendor/bin/phpunit

language: php

php:
  - 7.1
  - 7.2

addons:
    apt:
        packages:
            - rabbitmq-server

services:
    - rabbitmq

before_install:
    - sudo rabbitmq-plugins enable rabbitmq_management
    - composer self-update --stable --no-interaction

before_script:
    - composer install --prefer-source --no-interaction

script:
    - php rabbit vhost:reset my_vhost_name -p guest
    - php rabbit vhost:mapping:create examples/events.yml -p guest
    - vendor/bin/phpunit

Use sudo to enable the rabbitmq plugin
Use sudo to enable the rabbitmq plugin