.travis.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # @file
  2. # .travis.yml - Drupal for Travis CI Integration
  3. #
  4. # Template provided by https://github.com/LionsAd/drupal_ti.
  5. #
  6. # Based for simpletest upon:
  7. # https://github.com/sonnym/travis-ci-drupal-module-example
  8. language: php
  9. php:
  10. - 5.5
  11. - 5.6
  12. - 7
  13. - hhvm
  14. matrix:
  15. fast_finish: true
  16. allow_failures:
  17. - php: hhvm
  18. env:
  19. global:
  20. # add composer's global bin directory to the path
  21. # see: https://github.com/drush-ops/drush#install---composer
  22. - PATH="$PATH:$HOME/.composer/vendor/bin"
  23. # Configuration variables.
  24. - DRUPAL_TI_MODULE_NAME="redis"
  25. - DRUPAL_TI_SIMPLETEST_GROUP="redis"
  26. # Define runners and environment vars to include before and after the
  27. # main runners / environment vars.
  28. #- DRUPAL_TI_SCRIPT_DIR_BEFORE="./.drupal_ti/before"
  29. #- DRUPAL_TI_SCRIPT_DIR_AFTER="./drupal_ti/after"
  30. # The environment to use, supported are: drupal-7, drupal-8
  31. - DRUPAL_TI_ENVIRONMENT="drupal-8"
  32. # Drupal specific variables.
  33. - DRUPAL_TI_DB="drupal_travis_db"
  34. - DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db"
  35. # Note: Do not add a trailing slash here.
  36. - DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1"
  37. - DRUPAL_TI_WEBSERVER_PORT="8080"
  38. # Simpletest specific commandline arguments, the DRUPAL_TI_SIMPLETEST_GROUP is appended at the end.
  39. - DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT"
  40. # === Behat specific variables.
  41. # This is relative to $TRAVIS_BUILD_DIR
  42. - DRUPAL_TI_BEHAT_DIR="./tests/behat"
  43. # These arguments are passed to the bin/behat command.
  44. - DRUPAL_TI_BEHAT_ARGS=""
  45. # Specify the filename of the behat.yml with the $DRUPAL_TI_DRUPAL_DIR variables.
  46. - DRUPAL_TI_BEHAT_YML="behat.yml.dist"
  47. # This is used to setup Xvfb.
  48. - DRUPAL_TI_BEHAT_SCREENSIZE_COLOR="1280x1024x16"
  49. # The version of seleniumthat should be used.
  50. - DRUPAL_TI_BEHAT_SELENIUM_VERSION="2.44"
  51. # Set DRUPAL_TI_BEHAT_DRIVER to "selenium" to use "firefox" or "chrome" here.
  52. - DRUPAL_TI_BEHAT_DRIVER="phantomjs"
  53. - DRUPAL_TI_BEHAT_BROWSER="firefox"
  54. # Use Drupal 8.3.x to run tests.
  55. - DRUPAL_TI_CORE_BRANCH="8.3.x"
  56. # PHPUnit specific commandline arguments.
  57. - DRUPAL_TI_PHPUNIT_ARGS="--verbose --debug"
  58. # Specifying the phpunit-core src/ directory is useful when e.g. a vendor/
  59. # directory is present in the module directory, which phpunit would then
  60. # try to find tests in. This option is relative to $TRAVIS_BUILD_DIR.
  61. #- DRUPAL_TI_PHPUNIT_CORE_SRC_DIRECTORY="./tests/src"
  62. # Code coverage via coveralls.io
  63. - DRUPAL_TI_COVERAGE="satooshi/php-coveralls:0.6.*"
  64. # This needs to match your .coveralls.yml file.
  65. - DRUPAL_TI_COVERAGE_FILE="build/logs/clover.xml"
  66. # Debug options
  67. #- DRUPAL_TI_DEBUG="-x -v"
  68. # Set to "all" to output all files, set to e.g. "xvfb selenium" or "selenium",
  69. # etc. to only output those channels.
  70. #- DRUPAL_TI_DEBUG_FILE_OUTPUT="selenium xvfb webserver"
  71. # [[[ SELECT ANY OR MORE OPTIONS ]]]
  72. #- DRUPAL_TI_RUNNERS="phpunit"
  73. #- DRUPAL_TI_RUNNERS="simpletest"
  74. #- DRUPAL_TI_RUNNERS="behat"
  75. - DRUPAL_TI_RUNNERS="phpunit-core"
  76. matrix:
  77. - REDIS_INTERFACE=PhpRedis
  78. - REDIS_INTERFACE=Predis
  79. # This will create the database
  80. mysql:
  81. database: drupal_travis_db
  82. username: root
  83. encoding: utf8
  84. services:
  85. - redis-server
  86. before_install:
  87. - composer global require "lionsad/drupal_ti:dev-master#396d11d200005eb68491d24170da0a98ae7f51b3"
  88. - drupal-ti before_install
  89. install:
  90. - drupal-ti install
  91. before_script:
  92. - drupal-ti --include .travis-before-script.sh
  93. - drupal-ti before_script
  94. script:
  95. - drupal-ti script
  96. after_script:
  97. - drupal-ti after_script