-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
33 lines (26 loc) · 1.21 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
language: php
sudo: false
matrix:
include:
- php: '7.2'
env: coverage=1
cache:
directories:
- $HOME/.composer/cache
branches:
only:
- master
before_install:
- phpenv config-rm xdebug.ini || echo "xdebug not available"
- if [[ $coverage = 1 ]]; then mkdir -p build/logs build/cov; fi
- if [[ $coverage = 1 ]]; then wget https://phar.phpunit.de/phpcov.phar; fi
- if [[ $coverage = 1 ]]; then wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar; fi
- export PATH="$PATH:$HOME/.composer/vendor/bin"
install:
- if [[ $coverage = 1 ]]; then composer require --dev --no-update 'phpunit/php-code-coverage:^6.0.1'; fi
- if [[ $coverage = 1 ]]; then composer update --prefer-dist --no-progress --no-suggest --ansi; fi
script:
- if [[ $coverage = 1 ]]; then phpdbg -qrr -dmemory_limit=-1 vendor/bin/phpunit --verbose --coverage-php build/cov/coverage-phpunit.cov; else vendor/bin/phpunit --verbose; fi
- if [[ $coverage = 1 ]]; then phpdbg -qrr phpcov.phar merge --clover build/logs/clover.xml build/cov; fi
after_success:
- if [[ $coverage = 1 ]]; then travis_retry php coveralls.phar; fi