-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (54 loc) · 2.27 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
language: php
cache:
bundler: true
apt: true
directories:
- vendor
php:
- 5.5
before_install:
- openssl aes-256-cbc -K $encrypted_329767333dd7_key -iv $encrypted_329767333dd7_iv -in travis_rsa.enc -out travis_rsa -d
- sudo apt-get update > /dev/null
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
before_script:
# Apache webserver configuration
- sudo apt-get install -y --force-yes apache2 libapache2-mod-fastcgi
- sudo service apache2 stop
- sudo cp -f travis-ci-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo a2enmod rewrite actions fastcgi alias
# Phpenv php setup
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv
version-name)/etc/php-fpm.conf
- printf 'memory_limit = -1\ncgi.fix_pathinfo = 1\nmax_execution_time = 0\nsendmail_path
= /bin/true' > xx-env.ini
- phpenv config-add xx-env.ini
# Prep for logging
- mkdir -p build/logs
- touch build/logs/{error,access,php}.log
- sudo chmod -R 777 build
# Start Apache/PHP
- phpenv rehash
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
- sudo service apache2 start
- php -i > build/logs/php.log
# MySQL database configuration
- mysql -e 'CREATE DATABASE travis;'
- mysql -e "SET PASSWORD FOR 'travis'@'localhost' = PASSWORD('travis')";
# Ant build tool configuration
- cp build.properties.dist build.properties
- sed -i -e "s,username:password@host/db,[email protected]/travis,g" build.properties
- sed -i -e "s,#drupal.args,drupal.args,g" build.properties
- sed -i -e "s,#apache.user,apache.user,g" build.properties
- sed -i -e "s,#site.domain,site.domain,g" build.properties
# Hack to force a local.settings.php file into /sites/default
- echo '<?php $databases = array("default" => array("default" => array("database" => "travis","username" => "travis","password" => "travis","host" => "localhost","driver" => "mysql")));' > sites/default/local.settings.php
script:
- ant -v -logger org.apache.tools.ant.listener.AnsiColorLogger run-tests
after_success:
- ./acquia-deploy.sh
env:
global:
secure: Ss+sEeWXr7D+lX4Rjyu1h4obTVO/OuuGi2Zu+srmzShriG10aUEvfLucknmPeEKAQFqKYrAtfOWhvIkIeP4QPyE+D1YlctUcBxZC6OB5x0fhioLlEVPH0Lc7JCgYMMkbW9mR2Qw6euyU0HI/xID3eVzKHuvwyr0jgamf4afgENA=