forked from ddeboer/imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (38 loc) · 1.39 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
language: php
sudo: required
matrix:
fast_finish: true
include:
- php: 7.0
env: CS_CHECK=1 STATIC_ANALYSIS=1
- php: 7.1
- php: 7.2
env: CODE_COVERAGE=1
addons:
hosts:
- dovecot.travis.dev
env:
global:
- IMAP_SERVER_NAME=dovecot.travis.dev
- IMAP_SERVER_PORT=993
- IMAP_USERNAME=dovecot_travis_testuser
- IMAP_PASSWORD=dovecot_travis_testpwd
cache:
directories:
- $HOME/.composer/cache
install:
- sh .travis/dovecot_install.sh
- if [ "$CODE_COVERAGE" != 1 ]; then phpenv config-rm xdebug.ini || true; fi
- if [ "$CS_CHECK" != 1 ]; then composer remove --no-update --no-scripts --dev friendsofphp/php-cs-fixer; fi
- if [ "$STATIC_ANALYSIS" != 1 ]; then composer remove --no-update --no-scripts --dev phpstan/phpstan phpstan/phpstan-phpunit; fi
- composer install
script:
- vendor/bin/phpunit --coverage-clover ./clover.xml
- if [ "$CS_CHECK" = 1 ]; then vendor/bin/php-cs-fixer fix --diff --dry-run --verbose; fi
- if [ "$CS_CHECK" = 1 ]; then php .travis/readme-index.php; fi
- if [ "$STATIC_ANALYSIS" = 1 ]; then vendor/bin/phpstan analyze --no-progress --configuration=phpstan.neon src/ tests/; fi
after_script:
- if [ "$CODE_COVERAGE" = 1 ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$CODE_COVERAGE" = 1 ]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi
notifications:
email: false