-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (35 loc) · 980 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
language: php
sudo: false
dist: trusty
php:
- 7.1
- 7.2
- nightly
- hhvm
matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm
before_install:
# Remove PHP CS Fixer for incompatible PHP versions
- if [[ $TRAVIS_PHP_VERSION == "nightly" || $TRAVIS_PHP_VERSION == "hhvm" ]]; then composer remove friendsofphp/php-cs-fixer --dev --no-update; fi
before_script:
# Set up Composer
- composer self-update || true
- 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 compatible)
- if [[ $TRAVIS_PHP_VERSION != "nightly" && $TRAVIS_PHP_VERSION != "hhvm" ]]; 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 vendor dirs
cache:
directories:
- vendor
- $COMPOSER_CACHE_DIR
- cs_cache