.travis.yml 3.7 KB

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