forked from rectorphp/rector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
40 lines (33 loc) · 833 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
matrix:
include:
- php: 7.1
env: STATIC_ANALYSIS=true
- php: 7.2
env: PHPUNIT_FLAGS="--coverage-clover coverage.xml"
install:
- composer install
before_script:
# disable xdebug if not coverage
- if [[ $PHPUNIT_FLAGS = "" ]]; then phpenv config-rm xdebug.ini; fi
script:
- vendor/bin/phpunit $PHPUNIT_FLAGS
# disable xdebug
- phpenv config-rm xdebug.ini || return 0
- |
if [[ $STATIC_ANALYSIS != "" ]]; then
composer check-cs
composer phpstan
fi
after_script:
# upload coverage to Coveralls.io
- |
if [[ $PHPUNIT_FLAGS != "" ]]; then
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
php coveralls.phar --verbose
fi
cache:
directories:
- $HOME/.composer/cache
notifications:
email: never