.travis.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. language: php
  2. php:
  3. - 7.2
  4. - 7.3
  5. - 7.4snapshot
  6. matrix:
  7. fast_finish: true
  8. env:
  9. matrix:
  10. - DRIVER="xdebug" DEPENDENCIES="high"
  11. - DRIVER="phpdbg" DEPENDENCIES="high"
  12. - DRIVER="pcov" DEPENDENCIES="high"
  13. - DRIVER="xdebug" DEPENDENCIES="low"
  14. - DRIVER="phpdbg" DEPENDENCIES="low"
  15. - DRIVER="pcov" DEPENDENCIES="low"
  16. global:
  17. - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
  18. before_install:
  19. - ./tools/composer clear-cache
  20. install:
  21. - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS; fi
  22. - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi
  23. before_script:
  24. - |
  25. if [[ "$DRIVER" = 'pcov' ]]; then
  26. echo > $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/xdebug.ini
  27. git clone --single-branch --branch=v1.0.6 --depth=1 https://github.com/krakjoe/pcov
  28. cd pcov
  29. phpize
  30. ./configure
  31. make clean install
  32. echo "extension=pcov.so" > $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/pcov.ini
  33. cd $TRAVIS_BUILD_DIR
  34. fi
  35. script:
  36. - if [[ "$DRIVER" = 'phpdbg' ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
  37. - if [[ "$DRIVER" != 'phpdbg' ]]; then vendor/bin/phpunit --coverage-clover=coverage.xml; fi
  38. after_success:
  39. - bash <(curl -s https://codecov.io/bash)
  40. notifications:
  41. email: false
  42. jobs:
  43. include:
  44. - stage: Static Code Analysis
  45. php: 7.3
  46. env: php-cs-fixer
  47. install:
  48. - phpenv config-rm xdebug.ini
  49. script:
  50. - ./tools/php-cs-fixer fix --dry-run -v --show-progress=dots --diff-format=udiff