forked from bearsunday/BEAR.Resource
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (49 loc) · 1.58 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
language: php
sudo: false
php:
- 7.1
- 7.2
- 7.3
cache:
directories:
- vendor
- $HOME/.composer/cache
matrix:
fast_finish: true
before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- composer self-update
install:
- composer update
script:
- ./vendor/bin/phpunit;
jobs:
include:
- stage: Test
name: Lowest dependencies
php: 7.2
install: composer update --prefer-dist --prefer-lowest
- stage: Test
name: Code coverage
php: 7.2
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover;
- stage: Code Quality
name: Static analysis
php: 7.2
install: composer global require --dev phpstan/phpstan ^0.11 vimeo/psalm ^2.0;
script:
- ~/.composer/vendor/bin/phpstan analyse -l max -c phpstan.neon src tests --no-progress --no-interaction;
- ~/.composer/vendor/bin/psalm --show-info=false
- stage: Code Quality
name: Coding standards
php: 7.2
install: composer global require --dev friendsofphp/php-cs-fixer ^2.0;
script:
- ~/.composer/vendor/bin/php-cs-fixer --dry-run -v fix;