.travis.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. language: php
  2. env:
  3. global:
  4. - ZIPALIGN_INSTALL=false
  5. - COVERAGE=false
  6. - PHPUNIT_FLAGS="-v -c phpunit.xml --testsuite only_fast_tests"
  7. matrix:
  8. include:
  9. - php: 5.5
  10. os: linux
  11. dist: trusty
  12. - php: 5.6
  13. os: linux
  14. dist: xenial
  15. env: ZIPALIGN_INSTALL=true
  16. - php: 7.0
  17. os: linux
  18. dist: xenial
  19. env: ZIPALIGN_INSTALL=true
  20. - php: 7.1
  21. os: linux
  22. dist: xenial
  23. env: ZIPALIGN_INSTALL=true
  24. - php: 7.2
  25. os: linux
  26. dist: xenial
  27. env: ZIPALIGN_INSTALL=true
  28. - php: 7.3
  29. os: linux
  30. dist: xenial
  31. env: ZIPALIGN_INSTALL=true
  32. - php: 7.4
  33. os: linux
  34. dist: xenial
  35. env: COVERAGE=true ZIPALIGN_INSTALL=true PHPUNIT_FLAGS="-v -c phpunit.xml --testsuite only_fast_tests --coverage-clover=coverage.clover"
  36. before_install:
  37. - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
  38. install:
  39. - travis_retry composer self-update && composer --version
  40. - travis_retry composer install --no-interaction
  41. addons:
  42. apt:
  43. packages:
  44. - unzip
  45. - p7zip-full
  46. before_script:
  47. - if [[ $ZIPALIGN_INSTALL = true ]]; then sudo apt-get install -y zipalign; fi
  48. script:
  49. - composer validate --no-check-lock
  50. - vendor/bin/phpunit ${PHPUNIT_FLAGS}
  51. after_success:
  52. - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  53. - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi