forked from oroinc/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (31 loc) · 1.14 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
sudo: false
language: php
branches:
only:
- master
- /^\d+\.\d+$/
php:
- 5.6
- 7.0
- 7.1
cache:
directories:
- $HOME/.composer
- $TRAVIS_BUILD_DIR/vendor
before_script:
- phpenv config-rm xdebug.ini
- phpenv config-add travis.php.ini
- composer self-update
- composer config minimum-stability dev
- composer config prefer-stable true
- composer config repositories.oro composer https://packagist.orocrm.com
- composer require --no-update --dev "phpunit/phpunit:5.7.*"
- composer require --no-update --dev "squizlabs/php_codesniffer:2.8.*"
- composer require --no-update --dev "phpmd/phpmd:2.6.*"
- composer global require fxp/composer-asset-plugin
- travis_wait composer update --prefer-dist --optimize-autoloader --no-interaction --no-suggest --prefer-stable
- 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
- if [[ $DIFF ]]; then ./vendor/bin/phpmd ${DIFF//$'\n'/,} text ./build/phpmd.xml --suffixes php; fi