|
| 1 | +# @file |
| 2 | +# .travis.yml - Drupal for Travis CI Integration |
| 3 | +# |
| 4 | +# Template provided by https://github.com/LionsAd/drupal_ti. |
| 5 | + |
| 6 | +language: php |
| 7 | + |
| 8 | +sudo: false |
| 9 | + |
| 10 | +php: |
| 11 | + - 7.1 |
| 12 | + - 7.2 |
| 13 | + |
| 14 | +matrix: |
| 15 | + fast_finish: true |
| 16 | + allow_failures: |
| 17 | + - php: hhvm |
| 18 | + |
| 19 | +env: |
| 20 | + global: |
| 21 | + # add composer's global bin directory to the path |
| 22 | + # see: https://github.com/drush-ops/drush#install---composer |
| 23 | + - PATH="$PATH:$HOME/.composer/vendor/bin" |
| 24 | + |
| 25 | + # Configuration variables. |
| 26 | + - DRUPAL_TI_MODULE_NAME="commerce_google_tag_manager" |
| 27 | + - DRUPAL_TI_SIMPLETEST_GROUP="commerce_google_tag_manager" |
| 28 | + |
| 29 | + # Define runners and environment vars to include before and after the |
| 30 | + # main runners / environment vars. |
| 31 | + #- DRUPAL_TI_SCRIPT_DIR_BEFORE="./drupal_ti/before" |
| 32 | + #- DRUPAL_TI_SCRIPT_DIR_AFTER="./drupal_ti/after" |
| 33 | + |
| 34 | + # The environment to use, supported are: drupal-7, drupal-8 |
| 35 | + - DRUPAL_TI_ENVIRONMENT="drupal-8" |
| 36 | + |
| 37 | + # Switch to 8.6.x versions instead of 8.1.x by default. |
| 38 | + - DRUPAL_TI_CORE_BRANCH="8.6.x" |
| 39 | + |
| 40 | + # The installation profile to use: |
| 41 | + #- DRUPAL_TI_INSTALL_PROFILE="testing" |
| 42 | + - COMPOSER_EXTRA_DEPENDENCIES="drupal/commerce:^2.8 drupal/google_tag:^1.1" |
| 43 | + |
| 44 | + # Drupal specific variables. |
| 45 | + - DRUPAL_TI_DB="drupal_travis_db" |
| 46 | + - DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db" |
| 47 | + # Note: Do not add a trailing slash here. |
| 48 | + - DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1" |
| 49 | + - DRUPAL_TI_WEBSERVER_PORT="8080" |
| 50 | + |
| 51 | + # Simpletest specific commandline arguments, the DRUPAL_TI_SIMPLETEST_GROUP is appended at the end. |
| 52 | + - DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT" |
| 53 | + |
| 54 | + # === Behat specific variables. |
| 55 | + # This is relative to $TRAVIS_BUILD_DIR |
| 56 | + - DRUPAL_TI_BEHAT_DIR="./tests/behat" |
| 57 | + # These arguments are passed to the bin/behat command. |
| 58 | + - DRUPAL_TI_BEHAT_ARGS="" |
| 59 | + # Specify the filename of the behat.yml with the $DRUPAL_TI_DRUPAL_DIR variables. |
| 60 | + - DRUPAL_TI_BEHAT_YML="behat.yml.dist" |
| 61 | + # This is used to setup Xvfb. |
| 62 | + - DRUPAL_TI_BEHAT_SCREENSIZE_COLOR="1280x1024x16" |
| 63 | + # The version of selenium that should be used. |
| 64 | + - DRUPAL_TI_BEHAT_SELENIUM_VERSION="2.48.2" |
| 65 | + # Set DRUPAL_TI_BEHAT_DRIVER to "selenium" to use "firefox" or "chrome" here. |
| 66 | + - DRUPAL_TI_BEHAT_DRIVER="phantomjs" |
| 67 | + - DRUPAL_TI_BEHAT_BROWSER="firefox" |
| 68 | + |
| 69 | + # PHPUnit specific commandline arguments. |
| 70 | + - DRUPAL_TI_PHPUNIT_ARGS="" |
| 71 | + # Specifying the phpunit-core src/ directory is useful when e.g. a vendor/ |
| 72 | + # directory is present in the module directory, which phpunit would then |
| 73 | + # try to find tests in. This option is relative to $TRAVIS_BUILD_DIR. |
| 74 | + #- DRUPAL_TI_PHPUNIT_CORE_SRC_DIRECTORY="./tests/src" |
| 75 | + |
| 76 | + # Code coverage via coveralls.io |
| 77 | + - DRUPAL_TI_COVERAGE="satooshi/php-coveralls:0.6.*" |
| 78 | + # This needs to match your .coveralls.yml file. |
| 79 | + - DRUPAL_TI_COVERAGE_FILE="build/logs/clover.xml" |
| 80 | + |
| 81 | + # Debug options |
| 82 | + # - DRUPAL_TI_DEBUG="-x -v" |
| 83 | + # Set to "all" to output all files, set to e.g. "xvfb selenium" or "selenium", |
| 84 | + # etc. to only output those channels. |
| 85 | + #- DRUPAL_TI_DEBUG_FILE_OUTPUT="selenium xvfb webserver" |
| 86 | + # - DRUPAL_TI_DEBUG_FILE_OUTPUT="all" |
| 87 | + |
| 88 | + matrix: |
| 89 | + # [[[ SELECT ANY OR MORE OPTIONS ]]] |
| 90 | + #- DRUPAL_TI_RUNNERS="phpunit" |
| 91 | + #- DRUPAL_TI_RUNNERS="simpletest" |
| 92 | + #- DRUPAL_TI_RUNNERS="behat" |
| 93 | + #- DRUPAL_TI_RUNNERS="phpunit simpletest behat" |
| 94 | + # Use phpunit-core to test modules with phpunit with Drupal 8 core. |
| 95 | + - DRUPAL_TI_RUNNERS="phpunit-core" |
| 96 | + |
| 97 | +mysql: |
| 98 | + database: drupal_travis_db |
| 99 | + username: root |
| 100 | + encoding: utf8 |
| 101 | + |
| 102 | +before_install: |
| 103 | + - composer self-update |
| 104 | + - cd ./tests |
| 105 | + - composer global config repositories.repo-name git https://github.com/wengerk/drupal_ti |
| 106 | + - composer global require "lionsad/drupal_ti:dev-patch-1" |
| 107 | + - drupal-ti before_install |
| 108 | + |
| 109 | +install: |
| 110 | + - drupal-ti install |
| 111 | + |
| 112 | +before_script: |
| 113 | + - drupal-ti before_script |
| 114 | + # Update from PHPUnit 4.x to 6.x as required by Drupal 8.6.x. |
| 115 | + - composer run-script drupal-phpunit-upgrade --working-dir=/home/travis/build/gridonic/drupal-8/drupal --no-interaction |
| 116 | + |
| 117 | +script: |
| 118 | + # Disable deprecations helper to avoid build failed caused by usage of |
| 119 | + # deprecations in Drupal Core. |
| 120 | + - export SYMFONY_DEPRECATIONS_HELPER=disabled |
| 121 | + - drupal-ti script |
| 122 | + |
| 123 | +after_script: |
| 124 | + - drupal-ti after_script |
| 125 | + |
| 126 | +notifications: |
| 127 | + email: false |
0 commit comments