.travis.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. language: php
  2. sudo: false
  3. git:
  4. depth: 1
  5. cache:
  6. directories:
  7. - $HOME/.composer/cache
  8. matrix:
  9. include:
  10. - php: hhvm
  11. sudo: required
  12. dist: trusty
  13. group: edge
  14. - php: hhvm-nightly
  15. sudo: required
  16. dist: trusty
  17. group: edge
  18. - php: 5.5
  19. - php: 5.6
  20. - php: 7.0
  21. - php: 5.5
  22. env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
  23. fast_finish: true
  24. before_script:
  25. - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then PHPUNIT_FLAGS="--coverage-clover clover"; else PHPUNIT_FLAGS=""; fi
  26. - if [[ $TRAVIS_PHP_VERSION != '5.6' && ! $TRAVIS_PHP_VERSION = hhvm* ]]; then phpenv config-rm xdebug.ini; fi
  27. - composer self-update
  28. - composer update $COMPOSER_FLAGS
  29. script:
  30. - vendor/bin/phpunit $PHPUNIT_FLAGS
  31. - php tests/benchmark.php json 10
  32. - php tests/benchmark.php yml 10
  33. - php tests/benchmark.php xml 10
  34. after_success:
  35. - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  36. - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then php ocular.phar code-coverage:upload --format=php-clover clover; fi