forked from infiniteluke/todo_restful
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (52 loc) · 1.84 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
language: php
php:
- 5.4
mysql:
database: drupal
username: root
encoding: utf8
before_install:
- sudo apt-get update > /dev/null
- composer self-update
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.*@dev
- phpenv rehash
before_script:
- cp default.config.sh config.sh
- bash scripts/ci/setup
- bash scripts/build
- cd www
- drush si todo --db-url=mysql://root:@127.0.0.1/drupal --account-pass=admin --yes
- drush cc all --yes
# Use drush migrate command to import dummy content, as user 1, so we don't have node access issues.
# - drush mi --all --user=1
- cd ..
# Create a behat configuration file.
- cd todo/behat
- cp behat.local.yml.travis behat.local.yml
# Create Drush alias.
- cp aliases.drushrc.php ~/.drush/
- composer install --prefer-source
script:
# Create display.
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3 # give xvfb some time to start
# start a web server on port 8080, run in the background; wait for initialization
- drush @todo runserver 127.0.0.1:8080 &
- until netstat -an 2>/dev/null | grep '8080.*LISTEN'; do true; done
# Run selenium.
- wget http://selenium-release.storage.googleapis.com/2.40/selenium-server-standalone-2.40.0.jar
- java -jar selenium-server-standalone-2.40.0.jar -p 4444 &
- sleep 5
- ./bin/behat --tags=~@wip
# Run WebTests ---------------------------------------------------------------
- drush @todo -y en simpletest
# Add the tests here. Use the group name, classname or the file.
# Example:
- drush @todo test-run "todo:demo"
# End Run WebTests -----------------------------------------------------------