language: php
sudo: false

matrix:
  include:
    - php: 5.3
      env: 
        - COMPOSER_OPTIONS="--prefer-lowest"
    - php: 5.4
    - php: 5.5
    - php: 5.6
      env: 
        - TEST_COVERAGE=true
    - php: 7.0
    - php: 7.1
    - php: hhvm
  allow_failures:
    - php: hhvm
  fast_finish: true

before_script:
  - if [[ $TEST_COVERAGE ]]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; fi
  - composer update --prefer-dist --prefer-stable --no-interaction $COMPOSER_OPTIONS

script:
  - bin/phpunit -v $PHPUNIT_FLAGS
  - src/Paraunit/Bin/paraunit run # self-consistency test

after_success:
  - if [[ $TEST_COVERAGE ]]; then php bin/coveralls -v; fi
  - if [[ $TEST_COVERAGE ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi
  - if [[ $TEST_COVERAGE ]]; then bin/test-reporter; fi

language: php
sudo: false

matrix:
  include:
    - php: 5.3
      env: 
        - COMPOSER_OPTIONS="--prefer-lowest"
    - php: 5.4
    - php: 5.5
    - php: 5.6
      env: 
        - TEST_COVERAGE=true
    - php: 7.0
    - php: 7.0
      env:
        - XDEBUG_DISABLE=true
    - php: 7.1
    - php: 7.1
      env:
        - XDEBUG_DISABLE=true
    - php: hhvm
  allow_failures:
    - php: hhvm
  fast_finish: true

install:
  - if [[ $XDEBUG_DISABLE ]]; then phpenv config-rm xdebug.ini; fi
  - if [[ $TEST_COVERAGE ]]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; fi
  - composer update --prefer-dist --prefer-stable --no-interaction $COMPOSER_OPTIONS

script:
  - bin/phpunit -v $PHPUNIT_FLAGS
  - src/Paraunit/Bin/paraunit run # self-consistency test

after_success:
  - if [[ $TEST_COVERAGE ]]; then php bin/coveralls -v; fi
  - if [[ $TEST_COVERAGE ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi
  - if [[ $TEST_COVERAGE ]]; then bin/test-reporter; fi

Add to Travis's matrix PHP 7 env with xdebug disabled
Add to Travis's matrix PHP 7 env with xdebug disabled
