-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (35 loc) · 1.01 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
language: php
sudo: false
php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- nightly
- hhvm
matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm
before_install:
# Remove PHP CS Fixer for PHP 5.5 since it requires PHP 5.6
- if [[ $TRAVIS_PHP_VERSION == "5.5" || $TRAVIS_PHP_VERSION == "hhvm" || $TRAVIS_PHP_VERSION == "nightly" ]]; then composer remove friendsofphp/php-cs-fixer --dev --no-update; fi
before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction
script:
# PHPUnit
- vendor/bin/phpunit --coverage-clover=coverage.xml
# PHP CodeSniffer
- vendor/bin/phpcs -p --report=summary
# PHP CS Fixer (if >=5.6)
- if [[ $TRAVIS_PHP_VERSION != "5.5" && $TRAVIS_PHP_VERSION != "hhvm" && $TRAVIS_PHP_VERSION != "nightly" ]]; then vendor/bin/php-cs-fixer fix --cache-file cs_cache/php_cs_fixer --dry-run; fi
after_success:
- bash <(curl -s https://codecov.io/bash)
cache:
directories:
- vendor
- $COMPOSER_CACHE_DIR
- cs_cache