Created
December 9, 2015 14:22
-
-
Save yanniboi/c1d787c36770c6716ce5 to your computer and use it in GitHub Desktop.
.travis.yml with drupal_ti
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # @file | |
| # .travis.yml - Drupal 8 Travis CI Integration | |
| language: php | |
| sudo: false | |
| php: | |
| # - 5.5 | |
| - 5.6 | |
| - 7 | |
| # Not sure what this does | |
| #matrix: | |
| # fast_finish: true | |
| # Set up environment variables. | |
| env: | |
| global: | |
| # add composer's global bin directory to the path | |
| # see: https://github.com/drush-ops/drush#install---composer | |
| - PATH="$PATH:$HOME/.composer/vendor/bin" | |
| # Configuration variables. | |
| - DRUPAL_TI_MODULE_NAME="decoupled_auth" | |
| # Not sure what simpletest group we are using yet. | |
| - DRUPAL_TI_SIMPLETEST_GROUP="Decoupled Auth" | |
| # The environment to use, supported are: drupal-7, drupal-8 | |
| - DRUPAL_TI_ENVIRONMENT="drupal-8" | |
| # Drupal specific variables. | |
| - DRUPAL_TI_DB="drupal_travis_db" | |
| - DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db" | |
| # Note: Do not add a trailing slash here. | |
| - DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1" | |
| - DRUPAL_TI_WEBSERVER_PORT="8080" | |
| # Simpletest specific commandline arguments, the DRUPAL_TI_SIMPLETEST_GROUP is appended at the end. | |
| - DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT --module user" | |
| matrix: | |
| #- DRUPAL_TI_RUNNERS="phpunit simpletest behat" | |
| #- We run phpunit manually in ./travis-ci/travis-script.sh | |
| - DRUPAL_TI_RUNNERS="simpletest" | |
| mysql: | |
| database: drupal_travis_db | |
| username: root | |
| encoding: utf8 | |
| before_install: | |
| - composer self-update | |
| - composer global require "yanniboi/drupal_ti:dev-master" | |
| - drupal-ti before_install | |
| install: | |
| - drupal-ti install | |
| before_script: | |
| - drupal-ti --include "./travis-ci/travis-before-script.sh" | |
| - drupal-ti before_script | |
| script: | |
| - drupal-ti --include "./travis-ci/travis-script.sh" | |
| - drupal-ti script | |
| after_script: | |
| - drupal-ti after_script | |
| notifications: | |
| irc: "chat.freenode.net#freelygive" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file lives in the travis-ci subdirectory | |
| name: Minimal | |
| type: profile | |
| description: 'Build a custom site without pre-configured functionality. Suitable for advanced users.' | |
| version: VERSION | |
| core: 8.x | |
| dependencies: | |
| - node | |
| - block | |
| - dblog | |
| - page_cache | |
| - dynamic_page_cache | |
| - decoupled_auth | |
| themes: | |
| - stark |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This file lives in the travis-ci subdirectory | |
| set -e $DRUPAL_TI_DEBUG | |
| # Ensure the right Drupal version is installed. | |
| # Note: This function is re-entrant. | |
| drupal_ti_ensure_drupal | |
| # Ensure the module is linked into the codebase. | |
| drupal_ti_ensure_module_linked | |
| # Require that minimal profile enables decoupled_auth. | |
| ls $DRUPAL_TI_DRUPAL_DIR | |
| ls $DRUPAL_TI_DRUPAL_DIR/modules/decoupled_auth | |
| cp $DRUPAL_TI_DRUPAL_DIR/modules/decoupled_auth/travis-ci/minimal.info.yml $DRUPAL_TI_DRUPAL_DIR/core/profiles/minimal | |
| # Enable main module and submodules. | |
| drush en -y decoupled_auth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This file lives in the travis-ci subdirectory | |
| set -e $DRUPAL_TI_DEBUG | |
| # Run PHPUnit tests and submit code coverage statistics. | |
| drupal_ti_ensure_drupal | |
| drupal_ti_ensure_module_linked | |
| cd $DRUPAL_TI_DRUPAL_DIR/core | |
| #$DRUPAL_TI_DRUPAL_DIR/vendor/bin/phpunit --group decoupled_auth | |
| $DRUPAL_TI_DRUPAL_DIR/vendor/bin/phpunit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment