-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
40 lines (33 loc) · 1.03 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
sudo: false
language: php
cache:
directories:
- $HOME/.composer/cache
- vendor
matrix:
fast_finish: true
include:
- php: 7.0
env:
- COMPOSER_ARGUMENTS=--prefer-lowest
- php: 7.0
env:
- EXECUTE_TEST_COVERALLS=true
- php: 7.2
env:
- EXECUTE_CS_CHECK=true
before_install:
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0; fi
install:
- travis_retry composer update --no-interaction $COMPOSER_ARGUMENTS
- composer info -i
script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then vendor/bin/phpunit --coverage-clover clover.xml test; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then vendor/bin/phpunit test; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then vendor/bin/php-cs-fixer fix -v --dry-run; fi
after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar;
chmod +x coveralls.phar;
php coveralls.phar -v;
fi