forked from barbushin/php-imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (49 loc) · 2.02 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
env:
global:
- CC_TEST_REPORTER_ID=4eed0d135b9e1a1668a68e5e29cc71faf872937d13c42efa4faf42dad5ed3375
language: php
php:
- 7.2.0
- 7.2
- 7.3
env:
- phpunitflags="--stop-on-failure --testdox --exclude-group=live"
matrix:
fast_finish: true
include:
- php: 7.2.0
dist: xenial
env:
- lint="yes"
- phpunitflags="do not run"
- php: 7.4
dist: bionic
env:
- analysis=yes
- phpunitflags="do not run"
- php: 7.4
dist: bionic
env:
- lint=no
- coverage=yes
- phpunitflags="--stop-on-failure --testdox --coverage-clover=clover.xml"
cache:
directories:
- $HOME/.composer/cache
- ./psalm/cache
before_script:
- if [[ "$coverage" != "yes" ]]; then phpenv config-rm xdebug.ini; fi
- composer install --no-interaction
- if [[ "$coverage" = "yes" ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
- if [[ "$coverage" = "yes" ]]; then chmod +x ./cc-test-reporter; fi
- if [[ "$coverage" = "yes" ]]; then ./cc-test-reporter before-build; fi
script:
- if [[ "$lint" != "no" ]]; then vendor/bin/parallel-lint .php_cs.dist src tests examples; fi
- if [[ "$phpunitflags" != "do not run" ]]; then vendor/bin/phpunit $phpunitflags; fi
- if [[ "$analysis" = "yes" ]]; then vendor/bin/composer-require-checker check ./composer.json; fi
- if [[ "$analysis" = "yes" ]]; then vendor/bin/phpmnd ./ --exclude=./.github/ --exclude=./examples/ --exclude=./vendor/ --exclude=./psalm/cache/ --non-zero-exit-on-violation --hint; fi
- if [[ "$analysis" = "yes" ]]; then vendor/bin/psalm --show-info=false --shepherd --diff --diff-methods; fi
- if [[ "$lint" = "yes" ]]; then vendor/bin/php-cs-fixer fix --allow-risky=yes --no-interaction --dry-run --diff-format=udiff -v; fi
- if [[ "$lint" = "yes" ]]; then vendor/bin/phpcpd src tests; fi
after_script:
- if [[ "$coverage" = "yes" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -t clover; fi