Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (29 sloc) 832 Bytes
language: php
php:
- '7.1'
- '7.2'
- '7.3'
- nightly
matrix:
allow_failures:
- php: nightly
cache:
directories:
- $HOME/.composer/cache
install:
- phpenv rehash
- composer install --dev
before_script:
- bin/phpcs --version
- echo $TRAVIS_COMMIT
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_PULL_REQUEST_SHA
- echo $TRAVIS_EVENT_TYPE
script:
- CHANGED_FILES=`git diff --name-only --diff-filter=ACM $TRAVIS_COMMIT~ $TRAVIS_COMMIT`
- echo "$CHANGED_FILES"
- CHANGED_PHP_FILES=`echo "$CHANGED_FILES" | grep "\.php$"`
- if [ -z "$CHANGED_PHP_FILES" ]; then travis_terminate 0; fi;
- echo "$CHANGED_PHP_FILES" | xargs -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )
- echo "$CHANGED_PHP_FILES" | xargs -n1 -P4 bin/phpcs --standard=PSR1,PSR2 --extensions=php -s
- bin/phpunit
You can’t perform that action at this time.