.travis.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Project language is PHP
  2. language: php
  3. # Use containerized infrastructure
  4. sudo: false
  5. # Test on Ubuntu Xenial (16.04)
  6. dist: xenial
  7. # Supported PHP-Versions
  8. php:
  9. - 7.0
  10. - 7.1
  11. - 7.2
  12. # Cache Composer's cache
  13. cache:
  14. directories:
  15. - $HOME/.composer/cache/files
  16. # Also Test on Trusty (14.04 LTS)
  17. matrix:
  18. include:
  19. - dist: trusty
  20. php: 7.0
  21. - dist: trusty
  22. php: 7.1
  23. - dist: trusty
  24. php: 7.2
  25. # Services to start (with their default configuration)
  26. services:
  27. - redis-server
  28. - memcached
  29. - mysql
  30. # Execute this commands before installing dependencies
  31. before_install:
  32. - composer self-update
  33. - composer validate
  34. - mysql -e 'CREATE DATABASE IF NOT EXISTS unittest;'
  35. # Install dependencies
  36. install:
  37. - composer install
  38. - printf "\n" | pecl install -f redis
  39. - printf "\n" | pecl install -f imagick
  40. - printf "\n" | pecl install -f apcu
  41. - printf "\n" | pecl install -f yaml
  42. # Execute commands before executing script (e.g Add extensions to php.ini)
  43. before_script:
  44. - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  45. # Execute commands which should make the build pass or fail
  46. script:
  47. - vendor/bin/phpunit
  48. # Execute commands which should run after successful build
  49. after_success:
  50. - travis_retry vendor/bin/php-coveralls
  51. # Disable E-Mail notifications
  52. notifications:
  53. email: false