Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] [CS] Add a required php-cs-fixer build run to Travis matrix #1057

Merged
merged 2 commits into from Mar 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 21 additions & 15 deletions .travis.yml
Expand Up @@ -7,14 +7,14 @@ cache:
directories:
- $HOME/.composer/cache


env:

global:
- SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
- ENABLE_CODE_COVERAGE="false"
- SIMPLE_PHPUNIT_FLAGS="-v"

- PHPUNIT_FLAGS="-v"
- PHPUNIT_ENABLED="true"
- PHPCSFIXER_ENABLED="false"
- COVERALLS_ENABLED="false"

matrix:

Expand All @@ -23,6 +23,10 @@ matrix:
include:

- php: 7.1
- php: 7.1
env:
- PHPUNIT_ENABLED="false"
- PHPCSFIXER_ENABLED="true"
- php: 7.1
env:
- SYMFONY_VERSION=4.0.*
Expand All @@ -39,8 +43,8 @@ matrix:
- COMPOSER_UPDATE_FLAGS="--no-dev"
- php: 7.2
env:
- ENABLE_CODE_COVERAGE="true"
- SIMPLE_PHPUNIT_FLAGS="-v --coverage-text --coverage-clover var/build/clover.xml"
- COVERALLS_ENABLED="true"
- PHPUNIT_FLAGS="-v --coverage-text --coverage-clover var/build/clover.xml"
- php: 7.2
env:
- SYMFONY_VERSION=dev-master
Expand All @@ -53,8 +57,8 @@ matrix:
allow_failures:

- env:
- ENABLE_CODE_COVERAGE="true"
- SIMPLE_PHPUNIT_FLAGS="-v --coverage-text --coverage-clover var/build/clover.xml"
- COVERALLS_ENABLED="true"
- PHPUNIT_FLAGS="-v --coverage-text --coverage-clover var/build/clover.xml"
- env:
- SYMFONY_VERSION=dev-master
- STABILITY=dev
Expand All @@ -72,27 +76,29 @@ before_install:
- if [[ "$STABILITY" != "" ]]; then
travis_retry composer config minimum-stability $STABILITY;
fi
- if [[ "$ENABLE_CODE_COVERAGE" != "true" ]]; then
- if [[ "$COVERALLS_ENABLED" != "true" ]]; then
phpenv config-rm xdebug.ini || true;
fi
- if [[ "$ENABLE_CODE_COVERAGE" == "true" ]]; then
- if [[ "$COVERALLS_ENABLED" == "true" ]]; then
travis_retry composer require --dev satooshi/php-coveralls:^2.0@dev --no-update $COMPOSER_FLAGS;
fi


install:

- travis_retry composer update --prefer-dist --no-interaction --no-suggest --no-progress --ansi $COMPOSER_FLAGS $COMPOSER_UPDATE_FLAGS
- ./vendor/bin/simple-phpunit install


script:

- ./vendor/bin/simple-phpunit $SIMPLE_PHPUNIT_FLAGS

- if [[ "$PHPUNIT_ENABLED" == "true" ]]; then
./vendor/bin/simple-phpunit $PHPUNIT_FLAGS;
fi
- if [[ "$PHPCSFIXER_ENABLED" == "true" ]]; then
vendor/bin/php-cs-fixer --dry-run --diff -vvv fix;
fi

after_success:

- if [[ "$ENABLE_CODE_COVERAGE" == "true" ]]; then
- if [[ "$PHPUNIT_ENABLED" == "true" && "$COVERALLS_ENABLED" == "true" ]]; then
./vendor/bin/php-coveralls -vvv --config .coveralls.yml;
fi;