language: php
cache: bundler
os: linux
dist: focal

jobs:
  allow_failures:
    - php: hhvm-3.30
  fast_finish: true
  include:
    - php: 7.4
      dist: focal
    - php: 7.3
      dist: bionic
    - php: 7.2
      dist: bionic
    - php: 7.1
      dist: bionic
    - php: 7.1
      dist: bionic
    - php: 5.6
      dist: xenial
    - php: 5.5
      dist: trusty
    - php: 5.4
      dist: trusty
    - php: 5.3
      dist: precise
    - php: hhvm-3.30
      dist: trusty


before_script:
  - composer self-update
  - composer install

script:
  - ./vendor/bin/phpunit --coverage-clover=coverage.clover
  - ./vendor/bin/phpcs --standard=PSR2 src/ tests/

after_script:
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-3.30" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-3.30" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi'

language: php
cache: bundler
os: linux
dist: focal

jobs:
  allow_failures:
    - php: hhvm-3.30
  fast_finish: true
  include:
    - php: 7.4
      dist: focal
    - php: 7.3
      dist: bionic
    - php: 7.2
      dist: bionic
    - php: 7.1
      dist: bionic
    - php: 7.1
      dist: bionic
    - php: 5.6
      dist: xenial
    - php: hhvm-3.30
      dist: trusty


before_script:
  - composer self-update
  - composer install

script:
  - ./vendor/bin/phpunit --coverage-clover=coverage.clover
  - ./vendor/bin/phpcs --standard=PSR2 src/ tests/

after_script:
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-3.30" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-3.30" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi'

Drop testing on very old PHP versions
ci: Drop testing on very old PHP versions