Skip to content

Commit

Permalink
Travis run php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickroger committed Dec 5, 2017
1 parent a9c52f3 commit b1beb6c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ composer.lock
local-samples
vendor
bin/phpspec
bin/php-cs-fixer
.php_cs.cache
File renamed without changes.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ branches:
only:
- master

before_script:
install:
- phpenv config-rm xdebug.ini
- travis_retry composer selfupdate
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- travis_retry composer install --prefer-dist --no-interaction

script: ./bin/phpspec run --format=pretty
script:
- CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}") & if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then IFS=$'\n' EXTRA_ARGS=('--path-mode=intersection' '--' ${CHANGED_FILES[@]}); fi & bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no "${EXTRA_ARGS[@]}"


- ./bin/phpspec run --format=pretty

notifications:
email: false
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"require-dev": {
"phpspec/phpspec": "^3.0"
"phpspec/phpspec": "^3.0",
"friendsofphp/php-cs-fixer": "^2.8"
},
"config": {
"bin-dir": "bin"
Expand Down

0 comments on commit b1beb6c

Please sign in to comment.