.travis.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. sudo: false
  10. php:
  11. - 5.3
  12. - 5.4
  13. - 5.5
  14. - 5.6
  15. - 7
  16. matrix:
  17. fast_finish: true
  18. allow_failures:
  19. - php: 7
  20. env:
  21. global:
  22. # add composer's global bin directory to the path
  23. # see: https://github.com/drush-ops/drush#install---composer
  24. - PATH="$PATH:$HOME/.composer/vendor/bin"
  25. # Configuration variables.
  26. - DRUPAL_TI_MODULE_NAME="filefield_paths"
  27. - DRUPAL_TI_SIMPLETEST_GROUP="File (Field) Paths"
  28. # Define runners and environment vars to include before and after the
  29. # main runners / environment vars.
  30. #- DRUPAL_TI_SCRIPT_DIR_BEFORE="./drupal_ti/before"
  31. #- DRUPAL_TI_SCRIPT_DIR_AFTER="./drupal_ti/after"
  32. # The environment to use, supported are: drupal-7, drupal-8
  33. - DRUPAL_TI_ENVIRONMENT="drupal-7"
  34. # Drupal specific variables.
  35. - DRUPAL_TI_DB="drupal_travis_db"
  36. - DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db"
  37. # Note: Do not add a trailing slash here.
  38. - DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1"
  39. - DRUPAL_TI_WEBSERVER_PORT="8080"
  40. # Simpletest specific commandline arguments, the DRUPAL_TI_SIMPLETEST_GROUP is appended at the end.
  41. - DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT"
  42. # === Behat specific variables.
  43. # This is relative to $TRAVIS_BUILD_DIR
  44. - DRUPAL_TI_BEHAT_DIR="./tests/behat"
  45. # These arguments are passed to the bin/behat command.
  46. - DRUPAL_TI_BEHAT_ARGS=""
  47. # Specify the filename of the behat.yml with the $DRUPAL_TI_DRUPAL_DIR variables.
  48. - DRUPAL_TI_BEHAT_YML="behat.yml.dist"
  49. # This is used to setup Xvfb.
  50. - DRUPAL_TI_BEHAT_SCREENSIZE_COLOR="1280x1024x16"
  51. # The version of seleniumthat should be used.
  52. - DRUPAL_TI_BEHAT_SELENIUM_VERSION="2.44"
  53. # Set DRUPAL_TI_BEHAT_DRIVER to "selenium" to use "firefox" or "chrome" here.
  54. - DRUPAL_TI_BEHAT_DRIVER="phantomjs"
  55. - DRUPAL_TI_BEHAT_BROWSER="firefox"
  56. # PHPUnit specific commandline arguments.
  57. - DRUPAL_TI_PHPUNIT_ARGS=""
  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. matrix:
  72. # [[[ SELECT ANY OR MORE OPTIONS ]]]
  73. #- DRUPAL_TI_RUNNERS="phpunit"
  74. #- DRUPAL_TI_RUNNERS="simpletest"
  75. #- DRUPAL_TI_RUNNERS="behat"
  76. #- DRUPAL_TI_RUNNERS="phpunit simpletest behat"
  77. # Use phpunit-core to test modules with phpunit with Drupal 8 core.
  78. #- DRUPAL_TI_RUNNERS="phpunit-core"
  79. - DRUPAL_TI_RUNNERS="simpletest"
  80. mysql:
  81. database: drupal_travis_db
  82. username: root
  83. encoding: utf8
  84. before_install:
  85. - composer self-update
  86. - cd ./tests
  87. - composer global require "lionsad/drupal_ti:1.*"
  88. - drupal-ti before_install
  89. install:
  90. - drupal-ti install
  91. before_script:
  92. - drupal-ti before_script
  93. - drush dl pathauto-7.x redirect-7.x token-7.x transliteration-7.x --destination="$TRAVIS_BUILD_DIR/../drupal-7/drupal/sites/all/modules"
  94. script:
  95. - drupal-ti script
  96. after_script:
  97. - drupal-ti after_script
  98. notifications:
  99. email: false