-
Notifications
You must be signed in to change notification settings - Fork 2
/
_travis.yml
65 lines (55 loc) · 1.78 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
language: php
sudo: false
git:
depth: 3
cache:
directories:
- $HOME/.composer/cache/files
env:
- COMPOSER_FLAGS="--prefer-stable --prefer-dist"
php:
<% if (project.phpVersion <= 5.6 && project.testPhpVersion != 5.6) { -%>
- 5.6
<% }
if (project.phpVersion <= 7.0 && project.testPhpVersion != 7.0) { -%>
- 7.0
<% }
if (project.phpVersion <= 7.1 && project.testPhpVersion != 7.1) { -%>
- 7.1
<% }
if (project.phpVersion <= 7.2 && project.testPhpVersion != 7.2) { -%>
- 7.2
<% }
if (project.supportNightly) { -%>
- nightly
<% } -%>
matrix:
fast_finish: true
include:
- php: <%= project.phpVersion %>
env:
- COMPOSER_FLAGS="--prefer-lowest --prefer-stable --prefer-dist"
- php: <%= project.testPhpVersion %>
env:
- TEST_VERSION=true
- COMPOSER_FLAGS="--prefer-stable --prefer-dist"
<% if (project.supportNightly) { -%>
allow_failures:
- php: nightly
<% } -%>
before_install:
- if [[ -z $TEST_VERSION && -f "/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" ]]; then phpenv config-rm xdebug.ini; fi
- composer global require hirak/prestissimo
- composer self-update --stable --no-progress
install:
- travis_retry composer update $COMPOSER_FLAGS --no-interaction --no-scripts --no-progress
<% if (control.coveralls) { -%>
- if [[ $TEST_VERSION ]]; then travis_retry composer require php-coveralls/php-coveralls $COMPOSER_FLAGS --no-interaction --no-scripts --no-progress ; fi
<% } -%>
script:
- if [[ $TEST_VERSION ]]; then composer qa <% if (control.coveralls) { -%>&& composer phpunit-clover <% } -%>; fi
- if [[ -z $TEST_VERSION ]]; then composer phpunit ; fi
<% if (control.coveralls) { -%>
after_script:
- if [[ $TEST_VERSION ]]; then travis_retry php vendor/bin/php-coveralls --verbose ; fi
<% } -%>