-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
117 lines (96 loc) · 3.81 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
language: php
php:
- 5.3
mysql:
database: drupal
username: root
encoding: utf8
env:
- UPGRADE=7.x-1.x-dev
matrix:
fast_finish: true
install:
# Add the Google Chrome packages.
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update > /dev/null
# Create a database for our Drupal site.
- "mysql -e 'create database drupal;'"
# Install the latest Drush 6.
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require --prefer-source --no-interaction drush/drush:6.*
- drush dl -y drupalorg_drush-7.x-1.x-dev --destination=$HOME/.drush
- drush cc drush
# Build Codebase
- cd ../
- mkdir profiles
- mv hotsauce profiles/
- mkdir drupal
- mv profiles drupal/
# Build the current branch.
- cd drupal
- drush make --yes profiles/hotsauce/drupal-org-core.make --prepare-install
- drush make --yes profiles/hotsauce/drupal-org.make --no-core --contrib-destination=profiles/hotsauce
- drush dl diff
- mkdir sites/default/private
- mkdir sites/default/private/files
- mkdir sites/default/private/temp
- cd ../
# Verify that all the .make files will work on Drupal.org.
- drush verify-makefile drupal/profiles/hotsauce/drupal-org.make
- find drupal/profiles/hotsauce/modules -name \*.make -print0 | xargs -0 -n1 drush verify-makefile
# Download an old version to test upgrading from.
- if [[ "$UPGRADE" != none ]]; then drush dl hotsauce-$UPGRADE; fi
# Setup files
- sudo chmod -R 777 drupal/sites/all
# Setup display for Selenium
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 5
# Get Chrome and ChromeDriver
- sudo apt-get install google-chrome-stable
- wget http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip
- unzip -a chromedriver_linux64.zip
# Insane hack from jsdevel:
# https://github.com/jsdevel/travis-debugging/blob/master/shim.bash
# This allows chrome-sandbox to work in side of OpenVZ, because I can't
# figure out how to start chrome with --no-sandbox.
- export CHROME_SANDBOX=/opt/google/chrome/chrome-sandbox
- sudo rm -f $CHROME_SANDBOX
- sudo wget https://googledrive.com/host/0B5VlNZ_Rvdw6NTJoZDBSVy1ZdkE -O $CHROME_SANDBOX
- sudo chown root:root $CHROME_SANDBOX; sudo chmod 4755 $CHROME_SANDBOX
- sudo md5sum $CHROME_SANDBOX
# Get Selenium
- wget http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar
- java -jar selenium-server-standalone-2.41.0.jar -Dwebdriver.chrome.driver=`pwd`/chromedriver > /dev/null 2>&1 &
- sleep 5
# Disable sendmail
- echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
before_script:
# Expand max_nesting_level to prevent error
- export ADDITIONAL_PATH=`php -i | grep -F --color=never 'Scan this dir for additional .ini files'`
- echo 'xdebug.max_nesting_level=9999' | sudo tee ${ADDITIONAL_PATH:42}/drupal.ini
# Do the site install
- cd drupal
- drush si hotsauce --db-url=mysql://root:@127.0.0.1/drupal --account-name=admin --account-pass=admin --site-mail=admin@example.com --site-name="hotsauce" --yes
- drush dis -y dblog
- drush vset -y file_private_path "sites/default/private/files"
- drush vset -y file_temporary_path "sites/default/private/temp"
- cd ../drupal
- drush runserver --server=builtin 8888 > /dev/null 2>&1 &
- SERVER_PID=$!
- sleep 3
after_script:
# Stop the webserver so that it's not still running when MySQL is stopped.
- kill $SERVER_PID
notifications:
email:
recipients:
- hotsauce-ci@googlegroups.com
on_success: always
on_failure: always
irc:
channels:
- "chat.freenode.net#hotsauce"
on_success: always
on_failure: always