StephaneBour
10/18/2017 - 12:13 PM

.travis.yml for legacy php application (without phpunit tests)

.travis.yml for legacy php application (without phpunit tests)

language: php

php:
  - 5.6
  - 7.1

install: composer install

before_script:
  - if find . -type f -name "*.php" ! -path "./vendor/*" | xargs -n 1 -P 8 -I % php -d error_reporting=32767 -l % \; 2>&1 >&- | grep "^" ; then exit 1; fi

script:
  - git diff --diff-filter=ACMRTUX --name-only $TRAVIS_COMMIT_RANGE | grep ".php" | xargs -n 1 -P 8 -I % php vendor/bin/php-cs-fixer --no-interaction --dry-run --diff -v fix %
  - vendor/bin/phpunit

before_install:
  - composer self-update -q
  - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;