.travis.yml 3.6 KB

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