language: php

env:
    global:
        - XDEBUG_MODE=coverage
        - COVERAGE=yes

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3
  - 7.4

matrix:
  include:
    - php: 5.3
      dist: precise
    - php: 5.4
      dist: trusty
    - php: 5.5
      dist: trusty
    - php: 8.0
      env:
        - COVERAGE=no

before_script:
  - composer install --prefer-source

script: php test/test.php

after_script:
  - if [[ $COVERAGE != no ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi
