This repository has been archived by the owner on Jun 24, 2018. It is now read-only.
/
.travis.yml
78 lines (62 loc) · 2.12 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
language: php
cache:
bundler: true
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
- "$HOME/.npm"
php:
- 5.5
env:
- VERSION=STABLE
- VERSION=HEAD
sudo: false
mysql:
database: drupal
username: root
encoding: utf8
before_install:
- phpenv config-rm xdebug.ini
- composer self-update
- composer --version
install:
# Add Composer's local bin directory to the PATH so that we will be running
# our installed versions of Drush, PHPCS, Behat, PhantomJS, etc.
- export PATH="$HOME/.composer/vendor/bin:$TRAVIS_BUILD_DIR/bin:$PATH"
# MySQL Options
- mysql -e 'SET GLOBAL wait_timeout = 5400;'
- mysql -e "SHOW VARIABLES LIKE 'wait_timeout'"
# PHP conf tweaks
- echo 'max_execution_time = 120' >> drupal.php.ini;
- echo 'sendmail_path = /bin/true' >> drupal.php.ini;
- phpenv config-add drupal.php.ini
- phpenv rehash
# Install drush
- composer require drush/drush:^9.0
# Build the Lightning code base.
- composer install
# Install Lightning.
- cd docroot
- drush site-install lightning --yes --account-pass=admin --db-url=mysql://root:@localhost/drupal
# Update codebase to head and run db updates.
- if [ $VERSION = "HEAD" ]; then cd ..; fi;
- if [ $VERSION = "HEAD" ]; then rm -rf docroot/modules/contrib; fi;
- if [ $VERSION = "HEAD" ]; then composer require drupal/lightning:dev-8.x-1.x --no-update; fi;
- if [ $VERSION = "HEAD" ]; then composer update; fi;
- if [ $VERSION = "HEAD" ]; then cd docroot; fi;
- if [ $VERSION = "HEAD" ]; then drush updatedb -y; fi;
# Copy behat file from Lightning
- cp ./profiles/contrib/lightning/behat.* ../
- sed -i -e 's/%paths.base%\/tests\/features/docroot\/profiles\/contrib\/lightning\/tests\/features/g' ../behat.yml
- sed -i -e 's/tests\/features\/bootstrap/docroot\/profiles\/contrib\/lightning\/tests\/features\/bootstrap/g' ../behat.yml
- sed -i -e 's/..\/..\//docroot/g' ../behat.local.yml
before_script:
- drush runserver --default-server=builtin 8080 &>/dev/null &
- phantomjs --webdriver=4444 > /dev/null &
- sleep 5
- cd ..
script:
- bin/behat --strict
matrix:
fast_finish: true