-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
50 lines (40 loc) · 999 Bytes
/
.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
language: php
dist: xenial
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
include:
- php: 7.2
env: PREFER_LOWEST=1
- php: 7.3
env: CODECOVERAGE=1
before_install:
- |
if [[ $CODECOVERAGE == 1 ]]; then
pecl channel-update pecl.php.net
pecl install pcov
fi
- phpenv config-rm xdebug.ini
install:
- |
if [[ $CODECOVERAGE == 1 ]]; then
composer install --prefer-dist --no-interaction
else
composer update --prefer-lowest --prefer-stable --no-interaction
fi
script:
- |
if [[ $CODECOVERAGE == 1 ]]; then
vendor/bin/phpunit --verbose --coverage-clover=clover.xml
else
vendor/bin/phpunit --verbose
fi
after_success:
- |
if [[ $CODECOVERAGE == 1 ]]; then
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
chmod +x php-coveralls.phar
./php-coveralls.phar
fi