forked from doctrine/annotations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (47 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
dist: trusty
sudo: false
language: php
php:
- 7.2
- nightly
cache:
directories:
- $HOME/.composer/cache
before_install:
- |
if [ "x$COVERAGE" != "xyes" ]; then
mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || true
fi
- travis_retry composer self-update
install: travis_retry composer update --prefer-dist
before_script:
- |
if [ "x$COVERAGE" == "xyes" ] && [[ ! $(php -m | grep -si xdebug) ]]; then
echo "xdebug is required for coverage"
exit 1
fi
script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
./vendor/bin/phpunit --coverage-clover clover.xml
else
./vendor/bin/phpunit
fi
after_script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover clover.xml
fi
jobs:
allow_failures:
- php: nightly
exclude:
- php: 7.2
include:
- stage: Test
php: 7.2
env: COVERAGE=yes
- stage: Lint
install: travis_retry composer require --dev --prefer-dist phpstan/phpstan:^0.7
script: vendor/bin/phpstan analyse -l 3 -c phpstan.neon lib tests