forked from oroinc/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (25 loc) · 921 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
30
31
32
dist: bionic
language: php
branches:
only:
- master
- /^\d+\.\d+$/
php:
- 7.4.13
env:
- COMPOSER=travis.json
cache:
directories:
- $HOME/.composer
before_script:
- phpenv config-rm xdebug.ini
- phpenv config-add travis.php.ini
- composer self-update --1
- cp dev.json travis.json # avoid dev.lock file and composer.json with a stable version
- 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=PSR2
- ./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