.travis.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. language: php
  2. sudo: false
  3. branches:
  4. only:
  5. - master
  6. cache:
  7. directories:
  8. - $HOME/.composer/cache/files
  9. matrix:
  10. include:
  11. - php: 5.3
  12. - php: 5.4
  13. - php: 5.5
  14. - php: 5.6
  15. - php: hhvm
  16. - php: nightly
  17. - php: 7.0
  18. env: COVERAGE=yes
  19. - php: 7.0
  20. env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
  21. allow_failures:
  22. - php: hhvm
  23. - php: nightly
  24. fast_finish: true
  25. before_install:
  26. - if [[ $TRAVIS_PHP_VERSION != hhvm && $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini; fi;
  27. - if [[ $TRAVIS_REPO_SLUG = webmozart/assert ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
  28. - composer self-update
  29. install: composer update $COMPOSER_FLAGS --prefer-dist --no-interaction
  30. script: if [[ $COVERAGE = yes ]]; then vendor/bin/phpunit --verbose --coverage-clover=coverage.clover; else vendor/bin/phpunit --verbose; fi
  31. after_script: if [[ $COVERAGE = yes ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi