forked from 2amigos/yii2-usuario
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (53 loc) · 1.68 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
# faster builds on new travis setup not using sudo
sudo: false
language: php
php:
- 5.6
- 7.1
- 7.2
- 7.3
- 7.4
- nightly
services:
- mysql
matrix:
fast_finish: true
allow_failures:
- php: nightly
# cache vendor dirs
# cache:
# directories:
# - vendor
# - $HOME/.composer/cache
install:
- |
if [[ $TRAVIS_PHP_VERSION != '7.1' && $TRAVIS_PHP_VERSION != '7.2' && $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
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- COMPOSER_MEMORY_LIMIT=-1 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-usuario-test`;';
- php tests/_app/yii.php migrate/up --interactive=0
- php tests/_app/yii.php migrate/up --interactive=0 --migrationPath=@yii/rbac/migrations
# enable code coverage on PHP 7.2, only one PHP version needs to generate coverage data
- |
if [ $TRAVIS_PHP_VERSION = '7.2' ]; then
CODECEPTION_FLAGS="--coverage-xml"
fi
script:
- composer validate --no-check-lock
- vendor/bin/codecept run $CODECEPTION_FLAGS
after_script:
- |
if [ $TRAVIS_PHP_VERSION = '7.2' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover tests/_output/coverage.xml
fi