-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (23 loc) · 1.12 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
language: php
php:
- 7.2
cache:
directories:
- build/.composer-cache
before_install:
- export COMPOSER_CACHE_DIR="$(pwd)/build/.composer-cache"
- export XDEBUG="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini"
- mv -v "$XDEBUG" "$XDEBUG.disabled"
install:
- mkdir -p build/php_codesniffer build/php-cs-fixer build/ocular
- composer require --no-suggest --no-progress -n -a -d build/php-cs-fixer "friendsofphp/php-cs-fixer:^2.13"
- composer require --no-suggest --no-progress -n -a -d build/php_codesniffer "squizlabs/php_codesniffer:^3.3"
- composer require --no-suggest --no-progress -n -a -d build/ocular "scrutinizer/ocular:^1.5"
- composer update --no-suggest --no-progress -n -a
script:
- build/php_codesniffer/vendor/bin/phpcs -p --standard=PSR2 src tests
- build/php-cs-fixer/vendor/bin/php-cs-fixer fix -v --dry-run --allow-risky=yes --using-cache=no
- mv -v "$XDEBUG.disabled" "$XDEBUG"
- vendor/bin/phpunit --coverage-clover=build/coverage.clover --coverage-text
after_script:
- build/ocular/vendor/bin/ocular code-coverage:upload --format=php-clover build/coverage.clover