.travis.yml
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
matrix:
allow_failures:
- php: 7.0
- php: hhvm
fast_finish: true
before_install:
- travis_retry composer self-update
install:
- composer install --prefer-source
script: phpunit --coverage-text --coverage-clover=coverage.clover
after_script:
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php vendor/bin/test-reporter --coverage-report=coverage.clover --stdout > codeclimate.json; fi
- "if [ \"$TRAVIS_PHP_VERSION\" != \"7.0\" ] && [ \"$TRAVIS_PHP_VERSION\" != \"hhvm\" ]; then curl -X POST -d @codeclimate.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v0.1.1)' https://codeclimate.com/test_reports; fi"
sudo: false
addons:
code_climate:
repo_token: f7bc5d6dd57b875e6bb6d748caaf937d41eac69f8e251fb43c05b8835fd07e78