Skip to content

Instantly share code, notes, and snippets.

@haynescw
Created October 11, 2016 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haynescw/c776ef1e16e425c150618e250af1c866 to your computer and use it in GitHub Desktop.
Save haynescw/c776ef1e16e425c150618e250af1c866 to your computer and use it in GitHub Desktop.
# Note that the example .travis.yml file for child projects lives in /install.
sudo: false
language: php
php:
- 5.6
cache:
bundler: true
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
- "$HOME/.npm"
- "$HOME/.nvm"
- "vendor"
# Cache front end dependecies to dramatically improve build time.
- "docroot/themes/custom/test/node_modules"
- "docroot/themes/custom/test/bower_components"
addons:
ssh_known_hosts:
# - svn-1234.devcloud.hosting.acquia.com
# @see https://docs.travis-ci.com/user/notifications
notifications:
slack:
rooms: test:hash
on_success: always
on_failure: always
before_install:
- composer selfupdate
- phpenv config-rm xdebug.ini
- git config --global user.name "Travis-CI"
- git config --global user.email "noreply@travis-ci.org"
- mysql -e 'CREATE DATABASE test;'
install:
# Load composer dependencies.
- composer validate --no-check-all --ansi
- composer install
- export PATH=$PATH:$TRAVIS_BUILD_DIR/vendor/bin
# Install proper version of node for front end tasks.
- nvm install 4.4.1
- nvm use 4.4.1
before_script:
# Clear drush release history cache, to pick up new releases.
- rm -f ~/.drush/cache/download/*---updates.drupal.org-release-history-*
# Verify that no git diffs (caused by line ending variation) exist.
- git diff --exit-code
# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to run the site on Travis CI.
- drupal init
- drupal yaml:update:value project.yml project.local.hostname '127.0.0.1:8888'
script:
- ./blt.sh -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.launch-phantom=true ci:build:validate:test
after_failure:
# Dump out all installed modules.
- drush pml
# Uncomment to enable automatic deployments following merges.
deploy:
# provider: script
# script: ./blt.sh deploy -Ddeploy.commitMsg="Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" -Ddeploy.branch="${TRAVIS_BRANCH}-build"
# skip_cleanup: true
# on:
# branch: master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment