language: php
sudo: false

matrix:
  include:
    - php: 5.5
    - php: 5.6
    - php: 7.0
    - php: 7.1
      env: COLLECT_COVERAGE=true
  allow_failures:
    - php: 7.1
      env: INTEGRATION_TESTS="--testsuite \"Integration Test Suite\""

before_script:
  - travis_retry composer install --no-interaction
script:
  - vendor/bin/phpunit $INTEGRATION_TESTS
after_script:
  - if [[ "$COLLECT_COVERAGE" == "true" ]]; then vendor/bin/coveralls; fi

language: php
sudo: false

matrix:
  include:
    - php: 5.5
      env: TEST_SUITE="Unit Test Suite"
    - php: 5.6
      env: TEST_SUITE="Unit Test Suite"
    - php: 7.0
      env: TEST_SUITE="Unit Test Suite"
    - php: 7.1
      env: TEST_SUITE="Unit Test Suite" COLLECT_COVERAGE=true
    - php: 7.1
      env: TEST_SUITE="Integration Test Suite"
  allow_failures:
    - php: 7.1
      env: TEST_SUITE="Integration Test Suite"

before_script:
  - travis_retry composer install --no-interaction
script:
  - vendor/bin/phpunit --testsuite "$TEST_SUITE"
after_script:
  - if [[ "$COLLECT_COVERAGE" == "true" ]]; then vendor/bin/coveralls; fi

Exclude integration tests from other builds in the matrix
Exclude integration tests from other builds in the matrix
