.travis.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. language: php
  2. sudo: false
  3. matrix:
  4. fast_finish: true
  5. include:
  6. - env: DRUPAL=8.4.x
  7. php: 7.0
  8. - env: DRUPAL=8.4.x
  9. php: 5.6
  10. - env: DRUPAL=8.4.x
  11. php: 5.5
  12. - env: DRUPAL=8.5.x
  13. php: 7.1
  14. - env: DRUPAL=8.5.x
  15. php: 7.0
  16. - env: DRUPAL=8.5.x
  17. php: 5.6
  18. - env: DRUPAL=8.5.x
  19. php: 5.5
  20. addons:
  21. hosts:
  22. - example.com
  23. - one.example.com
  24. - two.example.com
  25. - three.example.com
  26. - four.example.com
  27. - five.example.com
  28. cache:
  29. directories:
  30. - $HOME/.composer/cache
  31. env:
  32. global:
  33. # add composer's global bin directory to the path
  34. # see: https://github.com/drush-ops/drush#install---composer
  35. - PATH="$PATH:$HOME/.composer/vendor/bin"
  36. mysql:
  37. database: domain
  38. username: root
  39. encoding: utf8
  40. notifications:
  41. email: false
  42. before_install:
  43. # Remove Xdebug. Not an issue for PHP 7.
  44. - phpenv config-rm xdebug.ini || true
  45. - composer self-update
  46. # Install Drush.
  47. - composer global require --no-interaction drush/drush:8.*
  48. install:
  49. # Optimize MySQL timeout and max packet size.
  50. - echo "mysql.connect_timeout=3000" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  51. - echo "default_socket_timeout=3000" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  52. - mysql -e 'create database domain'
  53. - mysql -e "SET GLOBAL wait_timeout = 36000;"
  54. - mysql -e "SET GLOBAL max_allowed_packet = 134209536;"
  55. before_script:
  56. # Remember the current rules test directory for later use in the Drupal installation.
  57. - TESTDIR=$(pwd)
  58. # Navigate out of module directory to prevent blown stack by recursive module lookup.
  59. - cd ..
  60. # Download Drupal 8 core.
  61. - travis_retry drush dl drupal-$DRUPAL --drupal-project-rename=drupal
  62. - cd drupal
  63. # Make the module appear in the correct place
  64. - ln -s $TESTDIR modules/domain
  65. # Install drupal default profile
  66. - /usr/bin/env PHP_OPTIONS="-d sendmail_path=$(which true)" drush --yes --verbose site-install minimal --db-url=mysql://root:@127.0.0.1/domain
  67. - drush --yes en simpletest domain domain_access domain_alias domain_config domain_source
  68. - drush cr
  69. # Start a web server on port 8080 in the background.
  70. - nohup php -S 0.0.0.0:8080 > /dev/null 2>&1 &
  71. # Wait until the web server is responding.
  72. - until curl -s example.com:8080; do true; done > /dev/null
  73. script:
  74. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain
  75. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Kernel" --php `which php` --url http://example.com:8080 domain
  76. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_access
  77. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_alias
  78. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Kernel" --php `which php` --url http://example.com:8080 domain_alias
  79. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_config
  80. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_content
  81. - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_source