.travis.yml 3.5 KB

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