forked from oroinc/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (23 loc) · 815 Bytes
/
.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
sudo: false
language: php
branches:
only:
- master
- /^\d+\.\d+$/
php:
- 7.0
- 7.1
cache:
directories:
- $HOME/.composer
before_script:
- phpenv config-rm xdebug.ini
- phpenv config-add travis.php.ini
- composer self-update
- travis_retry travis_wait composer install --prefer-dist --optimize-autoloader --no-interaction --no-suggest
- set +e; DIFF=$(git diff --name-only --diff-filter=ACMR $TRAVIS_COMMIT_RANGE | grep -e ".*\.php$"); set -e;
script:
- ./vendor/bin/phpunit
- ./vendor/bin/phpcs ./src -p --encoding=utf-8 --extensions=php --standard=./build/phpcs.xml
- ./vendor/bin/php-cs-fixer fix --dry-run --config=./build/.php_cs --path-mode=intersection ./src
- if [[ $DIFF ]]; then ./vendor/bin/phpmd ${DIFF//$'\n'/,} text ./build/phpmd.xml --suffixes php; fi