.travis.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. language: php
  2. php:
  3. - 5.4
  4. - 5.5
  5. - 5.6
  6. - 7.0
  7. sudo: false
  8. env:
  9. - DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'
  10. - DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test'
  11. - DB=sqlite db_dsn='sqlite:///:memory:'
  12. services:
  13. - memcached
  14. - redis-server
  15. matrix:
  16. fast_finish: true
  17. include:
  18. - php: 5.4
  19. env: PHPCS=1
  20. - php: hhvm-nightly
  21. env: HHVM=1 DB=sqlite db_dsn='sqlite:///:memory:'
  22. - php: hhvm-nightly
  23. env: HHVM=1 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'
  24. allow_failures:
  25. - php: 7.0
  26. - php: hhvm-nightly
  27. before_script:
  28. - composer self-update
  29. - composer install --prefer-dist --no-interaction
  30. - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
  31. - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test2;'; fi"
  32. - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test3;'; fi"
  33. - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
  34. - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test2;' -U postgres -d cakephp_test; fi"
  35. - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi"
  36. - sh -c "if [ '$HHVM' != '1' ]; then echo 'extension = memcached.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
  37. - phpenv rehash
  38. - set +H
  39. script:
  40. - sh -c "if [ '$PHPCS' != '1' ]; then phpunit; fi"
  41. - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
  42. notifications:
  43. email: false