123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. dist: trusty
  3. sudo: required
  4. language: php
  5. php:
  6. - 7.0
  7. - 7.1
  8. - 7.2
  9. - 7.3
  10. - nightly
  11. matrix:
  12. allow_failures:
  13. - php: nightly
  14. before_install:
  15. - sudo apt-get -qq update
  16. - sudo apt-get install -y imagemagick ghostscript unifont
  17. install:
  18. - composer install
  19. before_script:
  20. # Install 'imagick' plugin
  21. - bash -c 'if [[ $TRAVIS_PHP_VERSION != hhvm* ]]; then printf "\n" | pecl install imagick; fi'
  22. # Directory for coverage report
  23. - mkdir -p build/logs/
  24. script:
  25. # Check code style
  26. - php vendor/bin/phpcs --standard=psr2 src/ -n
  27. # Run tests
  28. - php vendor/bin/phpunit --coverage-clover build/logs/clover.xml
  29. after_success:
  30. # Upload coverage statistics to coveralls service after test
  31. - wget -c -nc https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
  32. - php coveralls.phar -v
  33. ...