.travis.yml
language: php
php:
- 5.5
- 5.6
- 7.0
- hhvm
# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
## Cache composer
cache:
directories:
- $HOME/.composer/cache
before_script:
- mkdir -p build/logs
- travis_retry composer self-update
- travis_retry composer update --no-interaction --prefer-dist
env:
global:
- CODECLIMATE_REPO_TOKEN=3f96e0739f5ada6c5e2aedb71278a9b1ba2db06dc139426ae8d657b0f3020308
script:
- vendor/bin/phpcs --standard=psr2 src/
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml
after_script:
- if [[ $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi
- if [[ $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then php vendor/bin/test-reporter --coverage-report ./build/logs/clover.xml; fi