-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
76 lines (66 loc) · 2.49 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Note that the example .travis.yml file for child projects lives in /install.
sudo: false
language: php
php:
- 5.6
env:
global:
- PHANTOMJS_CDNURL=http://cnpmjs.org/downloads
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/mytheme/node_modules"
# - "docroot/themes/custom/mytheme/bower_components"
addons:
ssh_known_hosts:
# - svn-4786.devcloud.hosting.acquia.com
# @see https://docs.travis-ci.com/user/notifications
notifications:
# - hipchat: [api token]@[room id or name]
# - slack: '<account>:<token>#[channel]'
before_install:
# Enable aliases for non-interactive shell.
- shopt -s expand_aliases
- composer selfupdate
# Disable xdebug.
- phpenv config-rm xdebug.ini
# Enable $_ENV variables in PHP.
- echo 'variables_order = "EGPCS"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Ensure that always_populate_raw_post_data PHP setting: Not set to -1 does not happen.
- echo "always_populate_raw_post_data = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- git config --global user.name "Travis-CI"
- git config --global user.email "[email protected]"
- mysql -e 'CREATE DATABASE drupal;'
install:
# Load composer dependencies.
- composer validate --no-check-all --ansi
- composer install
- export PATH=$TRAVIS_BUILD_DIR/vendor/bin:$PATH
# Initialize drupal console default configuration.
- drupal init
# 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 yaml:update:value project.yml project.local.hostname '127.0.0.1:8888'
script:
- blt -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.launch-phantom=true ci:build:validate:test
# Uncomment to enable automatic deployments following merges.
deploy:
# provider: script
# script: blt deploy -Ddeploy.commitMsg="Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" -Ddeploy.branch="${TRAVIS_BRANCH}-build"
# skip_cleanup: true
# on:
# branch: master