.travis.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. language: php
  2. dist: trusty
  3. env:
  4. - global:
  5. - TASK_TESTS_COVERAGE=0
  6. matrix:
  7. fast_finish: true
  8. include:
  9. - php: 8.1
  10. - php: 8.0
  11. - php: 7.4
  12. env: RUN_PHPSTAN=1
  13. - php: 7.3
  14. - php: 7.2
  15. # run tests coverage on PHP 7.1
  16. - php: 7.1
  17. env: TASK_TESTS_COVERAGE=1
  18. - php: 7.0
  19. - php: 5.6
  20. - php: 5.5
  21. - php: 5.4
  22. #- php: hhvm
  23. - php: hhvm-3.21
  24. install:
  25. - |
  26. if [[ $TASK_TESTS_COVERAGE != 1 ]]; then
  27. # disable xdebug for performance reasons when code coverage is not needed. note: xdebug on hhvm is disabled by default
  28. phpenv config-rm xdebug.ini || echo "xdebug is not installed"
  29. fi
  30. - travis_retry composer self-update
  31. - export PATH="$HOME/.composer/vendor/bin:$PATH"
  32. - travis_retry composer install $DEFAULT_COMPOSER_FLAGS
  33. - |
  34. if [ $TASK_TESTS_COVERAGE == 1 ]; then
  35. PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
  36. fi
  37. script:
  38. - vendor/bin/phpunit $PHPUNIT_FLAGS
  39. - |
  40. if [ $RUN_PHPSTAN == 1 ]; then
  41. composer require --dev phpstan/phpstan
  42. vendor/bin/phpstan analyse
  43. fi
  44. after_script:
  45. - |
  46. if [ $TASK_TESTS_COVERAGE == 1 ]; then
  47. travis_retry wget https://scrutinizer-ci.com/ocular.phar
  48. php ocular.phar code-coverage:upload --format=php-clover coverage.clover
  49. fi