-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.travis.yml
46 lines (35 loc) · 1.04 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
language: php
# only build master branch (and PRs)
branches:
only:
- "master"
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
env:
- PHPUNIT=true
dist: trusty
matrix:
exclude:
# dont want coverage on all runs, will include runs with just PHPUNIT
- php: 5.6
env: PHPUNIT=true
include:
# add tests without coverage
# add extra test runs for php7: coverage, codestyle
- php: 5.6
env: PHPUNIT=true COVERAGE=true
- php: 7.0
env: CODE_STYLE=true
install:
- composer update
before_script:
- if [ "${COVERAGE}" != "true" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then phpenv config-rm xdebug.ini && echo "xdebug disabled"; fi
script:
- if [ "$PHPUNIT" = "true" ]; then vendor/bin/phpunit; fi
- if [ "$CODE_STYLE" = "true" ]; then vendor/bin/phpcs -n --standard=PSR1,PSR2 src test && echo "Code style OK"; fi
after_script:
- if [ "${COVERAGE}" = "true" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/coverage.clover; fi