-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
42 lines (31 loc) · 1.22 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
language: php
php:
- 5.6
- 7.0
- 7.1
# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
cache:
directories:
- $HOME/.composer/cache
before_install:
# turn off XDebug
- phpenv config-rm xdebug.ini || return
# install dependencies in parallel
- travis_retry composer global require hirak/prestissimo
# install PHPSTAN globally for PHP 7+
- if [[ $TRAVIS_PHP_VERSION != '5.6' ]]; then composer global require phpstan/phpstan-shim; fi
before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction
- COMPOSER_PROCESS_TIMEOUT=0 composer test-server > /dev/null 2>&1 &
script:
# Run code standards analysis
- vendor/bin/phpcs --standard=psr2 src/
# Run PHPUnit with test coverage report
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
# Run PHPSTAN analysis for PHP 7+
- if [[ $TRAVIS_PHP_VERSION != '5.6' ]]; then ~/.composer/vendor/phpstan/phpstan-shim/phpstan.phar analyse src tests -l 5; fi
after_script:
- if [[ $TRAVIS_PHP_VERSION != '7.1' ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi