Created
August 23, 2018 22:43
-
-
Save alexfinnarn/760944c035e95435f9698605486e275e to your computer and use it in GitHub Desktop.
new travis file for Backdrop testing template
This file contains 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
language: php | |
# We want to avoid sudo. This allow us to use Travis docker infrastructure, which means builds start faster and have more CPU available. | |
sudo: false | |
git: | |
depth: 1 | |
php: | |
- '7.1' | |
branches: | |
only: | |
- 1.x-1.x | |
addons: | |
# The username and access key are stored in the Travis settings. | |
sauce_connect: true | |
services: | |
- mysql | |
# Cache Composer and db export. | |
# I removed caching of Drush since you have to clear Drush cache to get new Drupal versions. | |
cache: | |
directories: | |
- $HOME/.composer/cache/files | |
- $HOME/cache | |
install: | |
# Export variables used later on in the bash scripts. | |
- cd $TRAVIS_BUILD_DIR && cd ../ && export ROOT_DIR=$(pwd) | |
- export HOME | |
- export TRAVIS_EVENT_TYPE | |
# Name of bundle used as a placeholder in scripts. | |
- export MODULE_NAME="highlightjs_wysiwyg" | |
- export ADD_CUSTOM_MODULES="backdrop_test_users" | |
- export ADD_CONTRIB_MODULES="shortcode google_cse" | |
# Behat tags. Allows you to include/exclude tags per bundle as needed. | |
- export HEADLESS_BEHAT_TAGS="~@broken&&~@javascript" | |
- export JS_BEHAT_TAGS="~@broken&&@javascript" | |
# SimpleTest group. | |
- export SIMPLETEST_CLASSES="HighlightJSTests" | |
# Copy scripts to root. | |
- cd ${ROOT_DIR} | |
- cp -R ${ROOT_DIR}/${MODULE_NAME}/tests/travis-ci/* ${ROOT_DIR} | |
# Pulls in any helper functions used later in scripts. | |
- source $ROOT_DIR/helper-functions.sh | |
# Install and build dependencies. | |
- echo "Running install script..." | |
- $ROOT_DIR/build-code.sh | |
before_script: | |
# Setup config for PHP/MySQL, settings.php, and install database. | |
- echo "Running setup script..." | |
- $ROOT_DIR/setup-config.sh | |
# Perform the site install after removing Xdebug since it seems faster. | |
- echo "Running build script..." | |
- $ROOT_DIR/install-backdrop.sh | |
script: | |
# Run Behat tests. | |
- echo "Running Behat tests..." | |
- $ROOT_DIR/run-behat-tests.sh | |
# Run SimpleTests. | |
- echo "Running SimpleTest tests..." | |
- $ROOT_DIR/run-simpletests.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment