-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (27 loc) · 990 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
language: php
sudo: false
cache:
directories:
- ${HOME}/.composer/cache/files
matrix:
include:
- php: 7.1
env:
- DEPS_LOWEST=1
- php: 7.4
env:
- COVERAGE=1
- PHPSTAN=1
- php: nightly
fast_finish: true
allow_failures:
- php: nightly
install:
- phpenv config-rm xdebug.ini || true
- if [[ ${DEPS_LOWEST} == 1 ]]; then composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction; fi
- if [[ ${DEPS_LOWEST} != 1 ]]; then composer update --prefer-source --no-interaction; fi
script:
- if [[ ${PHPSTAN} == 1 ]]; then ./vendor/bin/phpstan analyse --level 1 ./src/ ./tests/; fi
- if [[ ${COVERAGE} == 1 ]]; then phpdbg -qrr ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
after_success:
- if [[ ${COVERAGE} == 1 ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi