.travis.yml 988 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. language: php
  2. dist: trusty
  3. sudo: false
  4. php:
  5. - 5.6
  6. - 7.0
  7. - 7.1
  8. - 7.2
  9. cache:
  10. directories:
  11. - vendor
  12. - $HOME/.composer/cache
  13. before_script:
  14. # Deactivate xdebug
  15. - if [ -z "$KEEP_XDEBUG" ]; then rm -rfv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ; fi
  16. - composer install --ignore-platform-reqs
  17. script:
  18. - ./vendor/bin/phpunit
  19. jobs:
  20. include:
  21. - stage: Code style
  22. php: 7.1
  23. script:
  24. - ./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run
  25. - ./vendor/bin/phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n
  26. - stage: Coverage
  27. php: 7.1
  28. env: KEEP_XDEBUG=1
  29. script:
  30. - ./vendor/bin/phpunit --debug --coverage-clover coverage-clover.xml
  31. after_script:
  32. - wget https://scrutinizer-ci.com/ocular.phar
  33. - php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml