-
Notifications
You must be signed in to change notification settings - Fork 106
/
.travis.yml
55 lines (49 loc) · 1.31 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
language: php
dist: trusty
env:
- global:
- TASK_TESTS_COVERAGE=0
matrix:
fast_finish: true
include:
- php: 8.1
- php: 8.0
- php: 7.4
env: RUN_PHPSTAN=1
- php: 7.3
- 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
- |
if [ $RUN_PHPSTAN == 1 ]; then
composer require --dev phpstan/phpstan
vendor/bin/phpstan analyse
fi
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