.travis.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. language: php
  2. php:
  3. - 5.6
  4. - 7.3
  5. - 7.4snapshot
  6. env:
  7. matrix:
  8. - DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test'
  9. global:
  10. - DEFAULT=1
  11. services:
  12. - postgresql
  13. - mysql
  14. matrix:
  15. fast_finish: true
  16. include:
  17. - php: 7.0
  18. env: DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test'
  19. - php: 7.2
  20. env: DB=sqlite db_dsn='sqlite:///:memory:'
  21. - php: 5.6
  22. env: PREFER_LOWEST=1
  23. - php: 7.2
  24. env: CHECKS=1 DEFAULT=0
  25. - php: 7.2
  26. env: CODECOVERAGE=1 DEFAULT=0
  27. allow_failures:
  28. - php: 7.4snapshot
  29. before_install:
  30. - if [[ ${TRAVIS_PHP_VERSION} != "7.4snapshot" ]]; then phpenv config-rm xdebug.ini ; fi
  31. before_script:
  32. - if [[ $PREFER_LOWEST != 1 ]]; then composer install --prefer-source --no-interaction ; fi
  33. - if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction ; fi
  34. - if [[ $PREFER_LOWEST == 1 ]]; then composer require --dev dereuromark/composer-prefer-lowest; fi
  35. - if [[ $CHECKS != 1 ]]; then composer require --dev phpunit/phpunit:"^5.7.14|^6.0"; fi
  36. - if [[ $DB == 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
  37. - if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
  38. script:
  39. - if [[ $DEFAULT == 1 ]]; then vendor/bin/phpunit; fi
  40. - if [[ $PREFER_LOWEST == 1 ]]; then vendor/bin/validate-prefer-lowest; fi
  41. - if [[ $CODECOVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml; fi
  42. - if [[ $CHECKS == 1 ]]; then composer phpstan-setup && composer phpstan ; fi
  43. - if [[ $CHECKS == 1 ]]; then composer cs-check ; fi
  44. after_success:
  45. - if [[ $CODECOVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
  46. cache:
  47. directories:
  48. - $HOME/.composer/cache
  49. notifications:
  50. email: false