-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
53 lines (42 loc) · 1.79 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
language: php
php:
- 5.3
before_script:
- export DISPLAY=:99
- mkdir -p /tmp/plugins/banneroid
- mv * /tmp/plugins/banneroid
- mkdir /tmp/ls && git clone git://github.com/stfalcon-studio/livestreet.git /tmp/ls
- cp -a /tmp/ls/* ./
- cp /tmp/ls/.htaccess ./
- mkdir -p plugins/banneroid && cp -a /tmp/plugins/banneroid/* plugins/banneroid
- mkdir -p uploads/banneroid
- echo "banneroid" > ./plugins/plugins.dat
# change application working folders for write access
- chmod -R 0777 ./tmp
- chmod -R 0777 ./uploads
- chmod -R 0777 ./templates/cache/
- chmod -R 0777 ./templates/compiled/
# install required PHP stuff
- sudo apt-get update
- sudo apt-get install php5 php5-cli php5-mysql php5-mcrypt php5-xsl php5-xdebug php-apc php5-gd php5-curl php5-intl php5-xmlrpc
# launch apache, MySQL and PHPUnit Selenium installers
- ./tests/travis/apache_setup.sh
- ./tests/travis/mysql_setup.sh
- mysql -u root -B social_test < ./plugins/banneroid/activate.sql
- mysql -u root -e "USE social_test; SHOW TABLES;" | wc -l
- cp ./config/config.test.php.dist config/config.test.php
- cp ./config/config.test.php.dist config/config.local.php
- sudo sed -i s/sql-mode/#sql-mode/ /etc/mysql/my.cnf
- sudo /etc/init.d/mysql restart
- sleep 5
- rm -rf ./install
- ls -la
- wget -S http://livestreet.test/ -O /dev/null
# start virtual display
- sh -e /etc/init.d/xvfb start
- sleep 5
# download and launch Selenium
- wget -O /tmp/selenium-server-standalone.jar http://selenium.googlecode.com/files/selenium-server-standalone-2.33.0.jar
- java -jar /tmp/selenium-server-standalone.jar > /dev/null &
- sleep 5
script: HTTP_APP_ENV=test cd tests/behat/ && php behat.phar --config='../../plugins/banneroid/tests/behat/behat.yml' --strict && php behat.phar --strict