ifhub.club/.travis.yml

49 lines
1.4 KiB
YAML
Raw Normal View History

2012-11-20 11:49:48 +02:00
language: php
php:
- 5.3
2013-01-14 12:28:23 +02:00
- 5.4
2012-11-20 11:49:48 +02:00
before_script:
# export virtual display
- export DISPLAY=:99
# 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/
2013-07-24 18:17:30 +03:00
- cp ./install/*.sql tests/fixtures/sql/
- rm -rf ./install
2012-11-20 11:49:48 +02:00
# install required PHP stuff
2013-07-24 18:17:30 +03:00
- 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 mysql-server mysql-client
2012-11-20 11:49:48 +02:00
# launch apache, MySQL and PHPUnit Selenium installers
- ./tests/travis/apache_setup.sh
- ./tests/travis/mysql_setup.sh
2012-11-23 11:17:44 +02:00
- mysql -u root -e "USE social_test; SHOW TABLES;" | wc -l
2012-11-22 16:30:35 +02:00
- cp ./config/config.test.php.dist config/config.test.php
- cp ./config/config.test.php.dist config/config.local.php
2012-11-20 11:49:48 +02:00
- sudo sed -i s/sql-mode/#sql-mode/ /etc/mysql/my.cnf
- sudo /etc/init.d/mysql restart
- sleep 5
# get HTML of main page (for debug)
2013-07-24 18:17:30 +03:00
2012-11-20 11:49:48 +02:00
- firefox --version
2012-11-23 11:17:44 +02:00
- wget -S http://livestreet.test -O /dev/null
2012-11-20 11:49:48 +02:00
# start virtual display
- sh -e /etc/init.d/xvfb start
- sleep 5
# download and launch Selenium
2013-07-24 18:17:30 +03:00
- wget -O /tmp/selenium-server-standalone.jar http://selenium.dev.stfalcon.com/selenium-server-standalone-latest.jar
2012-11-20 11:49:48 +02:00
- java -jar /tmp/selenium-server-standalone.jar > /dev/null &
- sleep 5
2012-11-23 11:21:24 +02:00
script: HTTP_APP_ENV=test php tests/behat/behat.phar -c tests/behat/behat.yml