.travis.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. language: php
  2. sudo: false
  3. matrix:
  4. fast_finish: true
  5. include:
  6. - env: DRUPAL=8.5.x
  7. php: 5.5
  8. - env: DRUPAL=8.5.x
  9. php: 5.6
  10. - env: DRUPAL=8.5.x
  11. php: 7.1
  12. - env: DRUPAL=8.5.x
  13. php: 7.2
  14. - env: DRUPAL=8.6.x
  15. php: 5.5
  16. - env: DRUPAL=8.6.x
  17. php: 5.6
  18. - env: DRUPAL=8.6.x
  19. php: 7.1
  20. - env: DRUPAL=8.6.x
  21. php: 7.2
  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. # Update PHPUnit.
  66. - composer run-script drupal-phpunit-upgrade
  67. # Make the module appear in the correct place
  68. - ln -s $TESTDIR modules/domain
  69. # Install drupal default profile
  70. - /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
  71. - drush --yes en simpletest domain domain_access domain_alias domain_config domain_source
  72. - drush cr
  73. # Start a web server on port 8080 in the background.
  74. - nohup php -S 0.0.0.0:8080 > /dev/null 2>&1 &
  75. # Wait until the web server is responding.
  76. - until curl -s example.com:8080; do true; done > /dev/null
  77. script:
  78. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain
  79. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Kernel" --php `which php` --url http://example.com:8080 domain
  80. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_access
  81. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_alias
  82. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Kernel" --php `which php` --url http://example.com:8080 domain_alias
  83. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_config
  84. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_content
  85. - php core/scripts/run-tests.sh --suppress-deprecations --verbose --color --concurrency 4 --types "PHPUnit-Functional" --php `which php` --url http://example.com:8080 domain_source