forked from humhub/humhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
71 lines (61 loc) · 2.3 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
71
language: php
php:
- 5.6
- 7.0
- 7.1
matrix:
fast_finish: true
dist: trusty
sudo: required
addons:
chrome: stable
# cache vendor dirs
cache:
directories:
- $HOME/.composer/cache
services: mysql
before_install:
- wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip
- unzip -d $HOME chromedriver_linux64.zip
- $HOME/chromedriver --url-base=/wd/hub &
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"
- travis_retry composer install --prefer-dist --no-interaction
# - travis_retry composer global require "codeception/codeception=2.3.*" "codeception/specify=*" "codeception/verify=*"
# Install test environment
- |
mysql -e 'CREATE DATABASE `humhub_test` CHARACTER SET utf8 COLLATE utf8_general_ci;'
cd $TRAVIS_BUILD_DIR/protected/humhub/tests
php codeception/bin/yii migrate/up --includeModuleMigrations=1 --interactive=0
php codeception/bin/yii installer/auto
php codeception/bin/yii search/rebuild
php ../../vendor/bin/codecept build
script:
- |
cd $TRAVIS_BUILD_DIR
php -S 127.0.0.1:8080 &> /dev/null &
#- phantomjs --webdriver=4444 > /dev/null 2>&1 & # Not in use since phantomjs hangs with QIODevice::write (QTcpSocket): device not open
- sleep 5
- curl --fail http://127.0.0.1:8080/index-test.php
- |
cd $TRAVIS_BUILD_DIR/protected/humhub/tests
php ../../vendor/bin/codecept run
after_failure:
- cd ../modules/user/tests/codeception/_output/
- ls
- cat useracceptancePasswordRecoveryCest.testPasswordRecovery.fail.html
#cat ../modules/*/tests/codeception/_output/*.html