-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
79 lines (59 loc) · 2.02 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
language: php
php:
- 5.5
mysql:
database: drupal
username: root
encoding: utf8
before_install:
- sudo apt-get update > /dev/null
- composer self-update
# Install Grunt and Bower.
- npm install -g grunt-cli bower
# Install Sass and Compass for Grunt to work.
- gem install compass
install:
# install php packages required for running a web server from drush on php 5.3
- sudo apt-get install -y --force-yes php5-cgi php5-mysql
# Install Drush.
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require drush/drush:6.*
- phpenv rehash
- npm install -g yo bower grunt-cli casperjs
- npm install
# Test the Yeoman generator.
- npm test
# Link the generator.
- npm link
before_script:
# Create display.
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Run PhantomJs.
- phantomjs --webdriver=4444 > ~/phantomjs.log 2>&1 &
- mkdir $TRAVIS_BUILD_DIR/../build
- cd $TRAVIS_BUILD_DIR/../build
# Initiate the generator to build using CLI. We use the --no-insight flag to
# prevent yo from waiting for user input about sending anonymous usgae
# statistics.
- yo hedley --no-insight --project-name=skeleton --github-repo=https://github.com/Foo/skeleton --db=skeleton --db-user=root --db-pass= --drupal-url=http://127.0.0.1
# Configure client.
- cd client
- cp config.travis.json config.json
- grunt serve > ~/grunt.log 2>&1 &
- cd ..
- cp $TRAVIS_BUILD_DIR/travis/aliases.drushrc.php ~/.drush/
- cp $TRAVIS_BUILD_DIR/travis/behat.local.yml.travis behat/behat.local.yml
# Start a web server on port 8080, run in the background; wait for
# initialization.
- drush @site runserver 127.0.0.1:8080 &
- until netstat -an 2>/dev/null | grep '8080.*LISTEN'; do true; done
# Wait for Grunt to finish loading.
- until $(curl --output /dev/null --silent --head --fail http://localhost:9000); do sleep 1; echo '.'; done
script:
# Run Behat tests.
- cd ./behat
- ./bin/behat --tags=~@wip
# Print logs.
- cat ~/grunt.log
- cat ~/phantomjs.log