-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
51 lines (43 loc) · 1.23 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
language: php
php:
- 5.5
- 5.6
- 7.0
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
directories:
- vendor
- $HOME/.composer/cache
install:
- travis_retry composer self-update && composer --version
- travis_retry composer global require "fxp/composer-asset-plugin:~1.1.1"
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install --dev --prefer-dist --no-interaction
- vendor/codeception/codeception/codecept build
before_script:
- mysql -e 'create database yii2_mediastorage_test;'
- php tests/testapp/yii migrate --interactive=0
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
- phantomjs --webdriver=4444 &
- sleep 10
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
CODECEPT_FLAGS=" --coverage --coverage-xml"
fi
script:
- |
cd tests/testapp/web
php -S localhost:8080 > /dev/null 2>&1 &
cd ../../../
vendor/codeception/codeception/codecept run --verbose $CODECEPT_FLAGS
after_script:
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
bash <(curl -s https://codecov.io/bash)
fi
after_failure:
- cat tests/_output/PageCrudCest.tryToTest.fail.html