sudo: false

language: php

matrix:
  fast_finish: true
  include:
    - php: 5.4
      dist: trusty
    - php: 5.5
      dist: trusty
    - php: 5.6
    - php: 7.0.27
      dist: trusty
    - php: 7.1
      dist: trusty
    - php: 7.2
    - php: 7.3
    - php: 7.4
      env:
        - EXECUTE_COVERAGE=true
  allow_failures:
    - php: hhvm
    
script:
  - if [[ $EXECUTE_COVERAGE == 'true' ]]; then phpunit --coverage-clover clover.xml tests; fi
  - if [[ $EXECUTE_COVERAGE != 'true' ]]; then phpunit tests; fi
  
after_success:
  - if [[ $EXECUTE_COVERAGE == 'true' ]]; then bash <(curl -s https://codecov.io/bash); fi
