humhub/.travis.yml

68 lines
2.2 KiB
YAML
Raw Normal View History

2015-03-31 08:06:48 +02:00
language: php
2015-07-11 10:36:02 +02:00
php:
- 5.6
- 7.0
2017-01-26 23:32:51 +01:00
- 7.1
2015-07-11 10:36:02 +02:00
matrix:
fast_finish: true
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
directories:
- $HOME/.composer/cache
2015-03-31 08:06:48 +02:00
services: mysql
2015-08-02 20:47:48 +02:00
before_install:
2016-12-18 23:51:15 +01:00
- phantomjs -v
2015-08-02 20:47:48 +02:00
- echo "extension=ldap.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
2015-07-11 10:36:02 +02:00
install:
2016-12-19 00:17:19 +01:00
#- wget http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip
#- unzip chromedriver_linux64.zip -d ./
#- export CHROME_BIN=chromium-browser
# Start xvfb for gui test
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# Download and start selenium
- sleep 3 # give xvfb some time to start
- echo "Download selenium-server-standalone jar file"
- wget -c -nc --retry-connrefused --tries=0 http://goo.gl/EoH85x -O selenium-server-standalone.jar
- echo "Run selenium server - background process"
- nohup bash -c "java -jar selenium-server-standalone.jar &" && sleep 1; cat nohup.out
# Run Composer update
2015-07-11 10:36:02 +02:00
- travis_retry composer self-update && composer --version
2015-11-23 16:07:23 +01:00
- travis_retry composer global require "fxp/composer-asset-plugin:~1.1.0"
2015-07-11 10:36:02 +02:00
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install --dev --prefer-dist --no-interaction
2016-09-19 11:46:11 +02:00
- travis_retry composer global require "codeception/codeception=2.1.*" "codeception/specify=*" "codeception/verify=*"
2016-12-19 00:17:19 +01:00
# Install test environment
2015-07-11 10:36:02 +02:00
- |
mysql -e 'CREATE DATABASE `humhub_test` CHARACTER SET utf8 COLLATE utf8_general_ci;'
cd protected/humhub/tests/codeception/bin
php yii migrate/up --includeModuleMigrations=1 --interactive=0
php yii installer/auto
2016-12-19 00:17:19 +01:00
php yii search/rebuild
2015-07-11 10:36:02 +02:00
cd ../../../../..
cd protected/humhub/tests
codecept build
cd ../../../
script:
2016-12-18 23:51:15 +01:00
- php -S 127.0.0.1:8080 > /dev/null 2>&1 &
2016-12-19 00:17:19 +01:00
#- phantomjs --webdriver=4444 > /dev/null 2>&1 & # Not in use since phantomjs hangs with QIODevice::write (QTcpSocket): device not open
2016-12-18 23:51:15 +01:00
- sleep 5
2016-12-19 00:17:19 +01:00
- curl http://127.0.0.1:8080/index-test.php
2015-07-11 10:36:02 +02:00
- |
cd protected/humhub/tests/
codecept run
2016-12-19 01:25:23 +01:00
after_failure:
2017-01-26 23:32:51 +01:00
- cd ../modules/user/tests/codeception/_output/
- ls
- cat useracceptancePasswordRecoveryCest.testPasswordRecovery.fail.html
2016-12-19 00:17:19 +01:00
#cat ../modules/*/tests/codeception/_output/*.html
2016-12-18 23:51:15 +01:00