forked from wapmorgan/Morphos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (39 loc) · 1.11 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
language: php
dist: trusty
env:
- global:
- TASK_TESTS_COVERAGE=0
matrix:
fast_finish: true
include:
- php: 7.2
# run tests coverage on PHP 7.1
- php: 7.1
env: TASK_TESTS_COVERAGE=1
- php: 7.0
- php: 5.6
- php: 5.5
- php: 5.4
- php: hhvm
- php: hhvm-3.21
install:
- |
if [[ $TASK_TESTS_COVERAGE != 1 ]]; 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
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install $DEFAULT_COMPOSER_FLAGS
- |
if [ $TASK_TESTS_COVERAGE == 1 ]; then
PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
fi
script:
- vendor/bin/phpunit $PHPUNIT_FLAGS
after_script:
- |
if [ $TASK_TESTS_COVERAGE == 1 ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi