Skip to content

Commit 96babbe

Browse files
author
Nico Stapelbroek
committed
Only run php-cs-fixer on one matrix build instead of one php version
1 parent f659e61 commit 96babbe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ matrix:
2020
php: 7.0
2121
- env: TEST_DIR=. COMPOSER_FLAGS="--prefer-lowest"
2222
php: 7.0
23-
- env: TEST_DIR=.
23+
- env: TEST_DIR=. PHP_CS_FIXER=true
2424
php: 7.1
2525
- env: TEST_DIR=. COMPOSER_FLAGS="--prefer-lowest"
2626
php: 7.1
@@ -38,14 +38,13 @@ before_install:
3838

3939
install:
4040
- composer update --prefer-source -o $COMPOSER_FLAGS
41-
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then wget http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -O $(pwd)/php-cs-fixer; fi
41+
- if [ "${PHP_CS_FIXER}" = "true" ]; then wget http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar && php ./php-cs-fixer-v2.phar fix --dry-run --diff $TRAVIS_BUILD_DIR; fi
4242
- PHPUNIT_BIN=$(pwd)/vendor/bin/phpunit
4343
- cd ${TEST_DIR}
4444
- composer update --prefer-source -o $COMPOSER_FLAGS
4545

4646
script:
4747
- $PHPUNIT_BIN --coverage-clover=coverage.clover
48-
- test $TEST_DIR = "." && $(pwd)/php-cs-fixer fix --config=.php_cs.dist --dry-run --diff $TRAVIS_BUILD_DIR || echo "Continue without php-cs-fixer"
4948

5049
after_success:
5150
- wget https://scrutinizer-ci.com/ocular.phar

0 commit comments

Comments
 (0)