forked from jsonrainbow/json-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (37 loc) · 1.21 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
sudo: false
language: php
cache:
directories:
- $HOME/.composer/cache
- $HOME/.phpcsfixer
matrix:
fast_finish: true
include:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty
- php: 5.6
- php: 7.0
env: WITH_COVERAGE=true
- php: 7.0
env: WITH_PHPCSFIXER=true
- php: 7.1
- php: 7.2
- php: 7.3
- php: 'nightly'
- php: hhvm
dist: trusty
allow_failures:
- php: 'nightly'
- php: hhvm
before_install:
- if [[ "$WITH_COVERAGE" != "true" && "$TRAVIS_PHP_VERSION" != "hhvm" && "$TRAVIS_PHP_VERSION" != "nightly" && "$TRAVIS_PHP_VERSION" != "7.1" ]]; then phpenv config-rm xdebug.ini; fi
- if [[ "$TRAVIS_PHP_VERSION" = "hhvm" || "$TRAVIS_PHP_VERSION" = "nightly" ]]; then sed -i '/^.*friendsofphp\/php-cs-fixer.*$/d' composer.json; fi
install:
- travis_retry composer install --no-interaction --prefer-dist
script:
- if [[ "$WITH_COVERAGE" == "true" ]]; then ./vendor/bin/phpunit --coverage-text; else composer test; fi
- if [[ "$WITH_PHPCSFIXER" == "true" ]]; then mkdir -p $HOME/.phpcsfixer && vendor/bin/php-cs-fixer fix --cache-file "$HOME/.phpcsfixer/.php_cs.cache" --dry-run --diff --verbose; fi