1dist: trusty
2language: php
3
4php:
5  - 7.0
6  - 7.1
7  - 7.2
8  - 7.3
9  - hhvm
10
11# This triggers builds to run on the new TravisCI infrastructure.
12# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
13sudo: false
14
15## Cache composer
16cache:
17  directories:
18    - $HOME/.composer/cache
19
20matrix:
21  include:
22    - php: 5.6
23      env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'
24
25before_script:
26  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
27
28script:
29  - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
30
31after_script:
32  - |
33    if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' && "$TRAVIS_PHP_VERSION" != '7.0' ]]; then
34      wget https://scrutinizer-ci.com/ocular.phar
35      php ocular.phar code-coverage:upload --format=php-clover coverage.clover
36    fi
37