forked from briannesbitt/Carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (63 loc) · 1.71 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
62
63
64
65
66
67
68
69
70
71
72
language: php
cache:
directories:
- $HOME/.composer/cache
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm
env:
global:
- coverage=false
- phpstan=false
- setup=basic
sudo: false
before_install:
- if [[ $TRAVIS_PHP_VERSION != 7.1 && $TRAVIS_PHP_VERSION != 'hhvm' && $coverage = 'false' ]]; then phpenv config-rm xdebug.ini; fi
install:
- if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction --no-suggest; fi
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-stable; fi
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-stable --prefer-lowest; fi
script:
- vendor/bin/phpunit --verbose --coverage-clover=coverage.xml
- if [[ $phpstan = 'true' ]]; then travis_retry composer require --dev phpstan/phpstan:^0.6 && vendor/bin/phpstan analyse --configuration phpstan.neon --level 3 src tests; fi
after_success:
- if [[ $coverage = 'true' ]]; then bash <(curl -s https://codecov.io/bash); fi
matrix:
include:
- php: 5.3
env: setup=lowest
- php: 5.3
env: setup=stable
- php: 5.4
env: setup=lowest
- php: 5.4
env: setup=stable
- php: 5.5
env: setup=lowest
- php: 5.5
env: setup=stable
- php: 5.6
env: setup=lowest
- php: 5.6
env: setup=stable
- php: 7.0
env: setup=lowest
- php: 7.0
env:
- phpstan=true
- setup=stable
- php: 7.1
env: setup=lowest
- php: 7.1
env:
- coverage=true
- phpstan=true
- setup=stable
allow_failures:
- php: hhvm
fast_finish: true