.travis.yml 3.5 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. sudo: false
  10. cache:
  11. directories:
  12. - $HOME/.composer/cache
  13. php:
  14. - 5.5
  15. - 5.6
  16. - 7
  17. - hhvm
  18. matrix:
  19. fast_finish: true
  20. allow_failures:
  21. - php: 7
  22. - php: hhvm
  23. branches:
  24. only:
  25. - "8.x-1.x"
  26. env:
  27. global:
  28. # add composer's global bin directory to the path
  29. # see: https://github.com/drush-ops/drush#install---composer
  30. - PATH="$PATH:$HOME/.composer/vendor/bin"
  31. # Configuration variables.
  32. - DRUPAL_TI_MODULE_NAME="profile"
  33. - DRUPAL_TI_SIMPLETEST_GROUP="profile"
  34. # Define runners and environment vars to include before and after the
  35. # main runners / environment vars.
  36. #- DRUPAL_TI_SCRIPT_DIR_BEFORE="./drupal_ti/before"
  37. #- DRUPAL_TI_SCRIPT_DIR_AFTER="./drupal_ti/after"
  38. # The environment to use, supported are: drupal-7, drupal-8
  39. - DRUPAL_TI_ENVIRONMENT="drupal-8"
  40. # Drupal specific variables.
  41. - DRUPAL_TI_DB="drupal_travis_db"
  42. - DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db"
  43. # Note: Do not add a trailing slash here.
  44. - DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1"
  45. - DRUPAL_TI_WEBSERVER_PORT="8080"
  46. # Simpletest specific commandline arguments, the DRUPAL_TI_SIMPLETEST_GROUP is appended at the end.
  47. - DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT"
  48. # === Behat specific variables.
  49. # This is relative to $TRAVIS_BUILD_DIR
  50. - DRUPAL_TI_BEHAT_DIR="./tests/behat"
  51. # These arguments are passed to the bin/behat command.
  52. - DRUPAL_TI_BEHAT_ARGS=""
  53. # Specify the filename of the behat.yml with the $DRUPAL_TI_DRUPAL_DIR variables.
  54. - DRUPAL_TI_BEHAT_YML="behat.yml.dist"
  55. # This is used to setup Xvfb.
  56. - DRUPAL_TI_BEHAT_SCREENSIZE_COLOR="1280x1024x16"
  57. # The version of seleniumthat should be used.
  58. - DRUPAL_TI_BEHAT_SELENIUM_VERSION="2.44"
  59. # PHPUnit specific commandline arguments.
  60. - DRUPAL_TI_PHPUNIT_ARGS=""
  61. # Code coverage via coveralls.io
  62. - DRUPAL_TI_COVERAGE="satooshi/php-coveralls:0.6.*"
  63. # This needs to match your .coveralls.yml file.
  64. - DRUPAL_TI_COVERAGE_FILE="build/logs/clover.xml"
  65. # Debug options
  66. #- DRUPAL_TI_DEBUG="-x -v"
  67. # Set to "all" to output all files, set to e.g. "xvfb selenium" or "selenium",
  68. # etc. to only output those channels.
  69. #- DRUPAL_TI_DEBUG_FILE_OUTPUT="selenium xvfb webserver"
  70. matrix:
  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 simpletest behat"
  76. # Uncomment once unit tests added.
  77. #- DRUPAL_TI_RUNNERS="phpunit-core simpletest"
  78. mysql:
  79. database: drupal_travis_db
  80. username: root
  81. encoding: utf8
  82. before_install:
  83. - composer self-update
  84. - composer global require "lionsad/drupal_ti:1.*"
  85. - drupal-ti before_install
  86. # Codesniffer and Coder
  87. - composer global require "squizlabs/php_codesniffer:2.0.*@dev"
  88. - composer global require drupal/coder:8.2.0-beta1
  89. - ln -s ~/.composer/vendor/drupal/coder/coder_sniffer/Drupal ~/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/
  90. install:
  91. - drupal-ti install
  92. before_script:
  93. - drupal-ti before_script
  94. script:
  95. - drupal-ti --include .travis-phpcs.sh
  96. - export SIMPLETEST_DB=mysql://root:@127.0.0.1/drupal_travis_db; drupal-ti script
  97. after_script:
  98. - drupal-ti after_script