-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
48 lines (37 loc) · 1.14 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
# There are no required fields for the .travis.yml
# If this file were empty it would still be valid.
#
# A test matrix is possible in Travis by supplying multiple environment
# variables and language versions.
language: php
php:
- '5.3'
env:
global:
- CUSTOM_MODULE_PATH='build/sites/all/modules/custom'
- DATABASE='drupal'
- DB_USERNAME='root'
- DB_ENCODE='utf8'
mysql:
database: $DATABASE
username: $DB_USERNAME
encoding: $DB_ENCODE
# Build fails if composer is not updated to latest version.
before_install:
- composer self-update
- pear channel-discover pear.drush.org
# Prepare to build a test site by installing Drush.
install:
- pear install drush/drush
- phpenv rehash
# Build the test site (there are many ways of accomplishing this step).
before_script:
- drush --yes make includes/droplet.make build
- mkdir -p $CUSTOM_MODULE_PATH
- git archive $(git rev-parse --abbrev-ref HEAD) | tar -x -C $CUSTOM_MODULE_PATH
- cd build
- drush --yes site-install gush --db-url="mysql://[email protected]/$DATABASE"
# Test the build.
script:
- drush --yes en simpletest
- drush --yes test-run DropletTestCase