-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (60 loc) · 2.72 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
77
78
79
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:
- master
addons:
# The username and access key are stored in the Travis settings.
sauce_connect: true
mysql:
database: drupal
username: root
encoding: utf8
# Cache Composer and database 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 bash scripts.
- cd $TRAVIS_BUILD_DIR && cd ../ && export ROOT_DIR=$(pwd)
- export HOME
- export TRAVIS_EVENT_TYPE
- export BUNDLE_NAME="cu_campus_news_bundle"
- export ADD_MODULES=""
- export EXPRESS_JS_BEHAT_TAGS="~@exclude_all_bundles&&~@broken&&~@bundle_conflict&&@javascript"
- export EXPRESS_HEADLESS_BEHAT_TAGS="~@exclude_all_bundles&&~@broken&&~@javascript"
- export BUNDLE_BEHAT_TAGS="~@exclude_all_bundles&&~@broken"
# Clone Express and copy setup scripts to root directory.
- git clone --branch dev https://github.com/CuBoulder/express.git ${ROOT_DIR}/express
- cp -R ${ROOT_DIR}/express/tests/travis-ci/* ${ROOT_DIR}
# Pulls in any helper functions used later in scripts.
- source $ROOT_DIR/helper-functions.sh
# Install and build dependencies.
- $ROOT_DIR/install.sh
before_script:
# Setup config for PHP/MySQL, settings.php, and install database.
- $ROOT_DIR/setup-config.sh
# Perform the site install after removing Xdebug since it seems faster.
- $ROOT_DIR/build-express.sh
script:
# Enable bundle.
- cd $ROOT_DIR/drupal
- $HOME/.composer/vendor/bin/drush en $BUNDLE_NAME -y
# Enable any additional modules used during test runs.
- $HOME/.composer/vendor/bin/drush en $ADD_MODULES -y
- $HOME/.composer/vendor/bin/drush cc all
# Run Behat and bundle tests.
- $ROOT_DIR/behat-tests.sh
notifications:
slack:
on_success: never
on_failure: always
rooms:
secure: q9Z3c6uNiCF+2l+BQsso1bQGbY0VmwXmw+StSlAGQxlccMh8HtDlrL4Rqk2ix0QMeGXffvLeATLThCq0ET9rmr9MIhTqRKfKgHUaQywiE3LZr+pgoPVGlqGbz1uSspWgWGkG3MWPtn1VC6pS4esm44YJ4mzucIKTswIe8DEWHTgi2Eju9P1w5HrtKBlM4+zxSwau5N5x+ol/LhafmvbODL5rBBH8lpErjVzSEf+5qQ/xu+I8tBdx7rqLmbbfPBXfn7Gx3THnaSG1WZZart6VXabbRdm029EWW6DxQQ6AyZTVwIHb59wrS3gL17SLsmvzXuYOlZMHBRTeAnt97czKILtoV/jscQE6z7AkPggaIFXcaWrvG+qSqZloym759i7YeYuwYdxy7QsDhNniHDXz3oP3jXJhN/TulYyuZYnPui5ihL3PHBoPy0t9PADeH8pxmhHrOB+t5WnQF02bAye6M4o0K+8HvUd24SgT4olUZbvNbuiwdZG0Ee4ZND4Azrd0W1LsyCPd8DJGsoaUe/KCtV8XdptgdIzpgfotDJMFnNK1QbSUUY5xigZoNEht7Gq7CruHFkM693FYDbJVCg9hlrtKafWaAvG8npvS5KPDxxHp7P6BgBOwtewzB3SpQuOSM/Y5qmO4U2lD6+nvzOihNUTVJYN7hO03fQFlI9M3E9o=