-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
41 lines (30 loc) · 838 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
language: php
php:
- 7.4
- nightly
matrix:
allow_failures:
- php: nightly
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
branches:
only:
- master
- travis
before_install:
- test "$TRAVIS_PHP_VERSION" != "nightly" || export COMPOSER_FLAGS="$COMPOSER_FLAGS --ignore-platform-reqs"
install:
- composer install --prefer-source $COMPOSER_FLAGS
- wget https://scrutinizer-ci.com/ocular.phar -O "$HOME/ocular.phar"
before_script: |
if (php -m | grep -q -i xdebug); then
export PHPUNIT_FLAGS="--coverage-clover cache/logs/clover.xml"
else
export PHPUNIT_FLAGS="--no-coverage"
fi
script:
- vendor/bin/phpunit $PHPUNIT_FLAGS
after_script:
- test "$PHPUNIT_FLAGS" == "--no-coverage" || php "$HOME/ocular.phar" code-coverage:upload --format=php-clover cache/logs/clover.xml