-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.travis.yml
50 lines (42 loc) · 986 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
50
language: php
sudo: false
git:
depth: 2
matrix:
include:
- php: 7.0
env: PHPSTAN=true COVERAGE=true
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
env: PHPSTAN=true
- php: nightly
allow_failures:
- php: nightly
- php: 7.4
cache:
directories:
- $HOME/.composer/cache
- $HOME/.php-cs-fixer
before_install:
- source .travis/xdebug.sh
- xdebug-disable
before_script:
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist -vvv --profile
script:
- if [[ $PHPSTAN == "true" ]]; then
composer require --dev phpstan/phpstan:^0.6 && vendor/bin/phpstan analyse -c phpstan.neon -l 3 src;
fi;
- if [[ "$COVERAGE" == "true" ]]; then
xdebug-enable;
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml;
xdebug-disable;
else
vendor/bin/phpunit;
fi;
after_success:
- if [[ "$COVERAGE" == "true" ]]; then
travis_retry php vendor/bin/coveralls;
fi;