os:
  - linux
  - osx

language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - nightly

install:
  - travis_retry composer self-update
  - travis_retry composer install --prefer-source --no-interaction

script: phpunit --configuration ./tests/phpunit.xml

matrix:
  allow_failures:
    - php: nightly

  notifications:
    email:
      on_success: never
      on_failure: always

os:
  - linux

sudo: required

language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - nightly

services:
  - docker

install:
  - travis_retry composer self-update
  - travis_retry composer install --prefer-source --no-interaction
  - docker pull phpunit/phpunit

script:
  - docker run -v $(pwd):/app phpunit/phpunit:5.7.12 --configuration ./tests/phpunit.xml

matrix:
  allow_failures:
    - php: nightly

notifications:
  email:
    on_success: never
    on_failure: always

Use docker container to run phpunit
Use docker container to run phpunit
