forked from humhub/humhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (60 loc) · 2.22 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
language: php
php:
- 5.6
- 7.0
- 7.1
matrix:
fast_finish: true
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
directories:
- $HOME/.composer/cache
services: mysql
before_install:
- phantomjs -v
- echo "extension=ldap.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
install:
#- 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
- travis_retry composer self-update && composer --version
- travis_retry composer global require "fxp/composer-asset-plugin:~1.3"
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install --dev --prefer-dist --no-interaction
- travis_retry composer global require "codeception/codeception=2.1.*" "codeception/specify=*" "codeception/verify=*"
# Install test environment
- |
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
php yii search/rebuild
cd ../../../../..
cd protected/humhub/tests
codecept build
cd ../../../
script:
- php -S 127.0.0.1:8080 > /dev/null 2>&1 &
#- phantomjs --webdriver=4444 > /dev/null 2>&1 & # Not in use since phantomjs hangs with QIODevice::write (QTcpSocket): device not open
- sleep 5
- curl http://127.0.0.1:8080/index-test.php
- |
cd protected/humhub/tests/
codecept run
after_failure:
- cd ../modules/user/tests/codeception/_output/
- ls
- cat useracceptancePasswordRecoveryCest.testPasswordRecovery.fail.html
#cat ../modules/*/tests/codeception/_output/*.html