-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.travis.yml
61 lines (49 loc) · 1.62 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
58
59
60
61
sudo: false
language: php
branches:
except:
- /^release-.*$/
cache:
directories:
- $HOME/.composer/cache
- $HOME/.php-cs-fixer
php:
- 7.1
- 7.2
env:
global:
- EXECUTE_CS_CHECK=false
- TEST_COVERAGE=false
matrix:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- DEPENDENCIES=""
matrix:
fast_finish: true
include:
- php: 7.2
env: DEPENDENCIES="" EXECUTE_CS_CHECK=true TEST_COVERAGE=true
exclude:
- php: 7.2
env: DEPENDENCIES=""
before_install:
- phpenv config-rm xdebug.ini || return 0
- composer self-update
- if [[ $TEST_COVERAGE == 'true' ]]; then composer require --no-update satooshi/php-coveralls:^1.0 ; fi
install:
- travis_retry composer update --no-interaction --prefer-dist $DEPENDENCIES
- composer info -i
before_script:
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then mkdir -p "$HOME/.php-cs-fixer" ; fi
script:
- if [[ $TEST_COVERAGE == 'true' ]]; then php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi
- ./vendor/bin/phpstan analyse -c phpstan.neon -l 7 src
after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/coveralls -v; fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/61c75218816eebde4486
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always