.travis.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. language: php
  2. php:
  3. - 5.4
  4. - 5.5
  5. - 5.6
  6. - 7.0
  7. - 7.1
  8. - 7.2
  9. matrix:
  10. fast_finish: true
  11. allow_failures:
  12. - php: hhvm
  13. include:
  14. - php: hhvm
  15. sudo: true
  16. dist: trusty
  17. group: edge
  18. cache:
  19. directories: "$HOME/.composer/cache"
  20. before_install:
  21. - wget https://phar.phpunit.de/phpunit-4.5.1.phar
  22. script:
  23. - php phpunit-4.5.1.phar --verbose $PHPUNIT_FLAGS
  24. sudo: false
  25. # cache vendor dirs
  26. cache:
  27. directories:
  28. - $HOME/.composer/cache
  29. install:
  30. - travis_retry composer self-update && composer --version
  31. - export PATH="$HOME/.composer/vendor/bin:$PATH"
  32. - travis_retry composer install --prefer-dist --no-interaction
  33. # install php extensions
  34. - |
  35. if (php --version | grep -i HipHop > /dev/null); then
  36. echo "Skipping imagick and gmagick tests on HHVM"
  37. else
  38. pear config-set preferred_state beta
  39. printf "\n" | pecl install imagick
  40. # gmagick is not installed on travis currently
  41. #printf "\n" | pecl install gmagick
  42. fi
  43. before_script:
  44. - |
  45. if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
  46. PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
  47. fi
  48. - composer require --prefer-dist --no-interaction 'phpunit/phpunit:4.8.27|~5.7.21|^6.2'
  49. script:
  50. - vendor/bin/phpunit $PHPUNIT_FLAGS
  51. after_script:
  52. - |
  53. if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
  54. travis_retry wget https://scrutinizer-ci.com/ocular.phar
  55. php ocular.phar code-coverage:upload --format=php-clover coverage.clover
  56. fi