-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
51 lines (41 loc) · 1.28 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
# faster builds on new travis setup not using sudo
sudo: false
language: php
php:
- 7.1
- 7.2
- 7.3
- nightly
matrix:
fast_finish: true
allow_failures:
- php: nightly
install:
- |
if [[ $TRAVIS_PHP_VERSION != '7.1' && $TRAVIS_PHP_VERSION != hhv* ]]; then
# disable xdebug for performance reasons when code coverage is not needed
# note: xdebug on hhvm is disabled by default
phpenv config-rm xdebug.ini || echo "xdebug is not installed"
fi
- travis_retry composer self-update && composer --version
- travis_retry composer install --prefer-dist --no-interaction
before_script:
- php -r "echo INTL_ICU_VERSION . \"\n\";"
- php -r "echo INTL_ICU_DATA_VERSION . \"\n\";"
- mysql --version
# initialize database
- mysql -e "create database yii2_roa_test"
# enable code coverage on PHP 7.1, only one PHP version needs to generate coverage data
- |
if [ $TRAVIS_PHP_VERSION = '7.1' ]; then
CODECEPTION_FLAGS="--coverage-xml"
fi
script:
- composer deploy-tests
- composer run-tests
after_script:
- |
if [ $TRAVIS_PHP_VERSION = '7.1' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover tests/_output/coverage.xml
fi