forked from Drupalcz/drupalcz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (69 loc) · 2.8 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
language: php
php:
- 5.6
- 7.0
mysql:
database: drupalcz
username: root
encoding: utf8
addons:
apt:
packages:
- apache2
- libapache2-mod-fastcgi
env:
global:
- DISPLAY=:99.0
before_install:
- composer self-update
install:
# Create MySQL Database.
- mysql -e 'create database drupalcz;'
# Set up Apache.
- sudo a2enmod rewrite actions fastcgi alias
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- if [[ -f ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ]] ; then sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf ; fi
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "variables_order = "EGPCS"" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# Configure apache virtual hosts.
- sudo cp -f tests/build/travis-ci-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
# Restart the server.
- sudo service apache2 restart
- cat /etc/apache2/sites-available/default
# Install stable Drush 8.
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require --prefer-dist --no-interaction drush/drush:8.0.3
# Disable sendmail.
- echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Set up site.
- cd ./docroot
- drush si dcz install_configure_form.update_status_module='array(FALSE,FALSE)' --sites-subdir=default --verbose --account-name=admin --account-pass=admin --site-mail=drupalcz_travis_dev@klaska.net --site-name="Drupal.cz" --yes
- cd ..
# Set up and run migrations.
- mysql -e 'create database d6migratesource;'
- git clone https://github.com/Drupalcz/drupalcz_db.git
- mysql -uroot d6migratesource < ./drupalcz_db/dcz_scrubbed_slim.sql
- cd ./docroot
- drush cim -y
- drush cr
- drush en -y dcz_migrate
- drush migrate-status
- drush migrate-import --group=dcz6 -vvv
- drush migrate-status
- cd ..
# Setup behat.
- cd ./tests/behat
- composer install --prefer-dist --no-interaction
- cd ../..
# Setup display for selenium.
- sh -e /etc/init.d/xvfb start
# Get Selenium.
- if [[ ! -e "$HOME/custom/selenium-server-standalone-2.44.0.jar" ]]; then wget --directory-prefix="$HOME/custom" http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar; fi;
- java -jar $HOME/custom/selenium-server-standalone-2.44.0.jar -p 4444 > /dev/null 2>&1 &
script:
# Run behat tests.
- cd ./tests/behat
- ./vendor/behat/behat/bin/behat
- cd ../..