Merge pull request #17853 from rodrigoprimo/fix/run-phpcs-only-once
Don't run PHPCS on the code coverage Travis job
This commit is contained in:
commit
39e27196c4
|
@ -6,7 +6,6 @@ sudo: false
|
|||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
|
||||
env:
|
||||
- WP_VERSION=latest WP_MULTISITE=0
|
||||
|
@ -20,6 +19,8 @@ matrix:
|
|||
dist: precise
|
||||
- php: 5.2
|
||||
dist: precise
|
||||
- php: 7.1
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
|
||||
- php: 7.1
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
allow_failures:
|
||||
|
@ -27,7 +28,6 @@ matrix:
|
|||
|
||||
before_script:
|
||||
- export PATH="$HOME/.composer/vendor/bin:$PATH"
|
||||
- if [[ $TRAVIS_PHP_VERSION == '7.1' ]]; then composer install; fi
|
||||
- bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
|
||||
- bash tests/bin/travis.sh before
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $TRAVIS_PHP_VERSION == '7.1' ]]; then
|
||||
if [[ ${RUN_PHPCS} == 1 ]]; then
|
||||
CHANGED_FILES=`git diff --name-only --diff-filter=ACMR $TRAVIS_COMMIT_RANGE | grep \\\\.php | awk '{print}' ORS=' '`
|
||||
IGNORE="tests/cli/,apigen/,includes/gateways/simplify-commerce/includes/,includes/libraries/,includes/api/legacy/"
|
||||
|
||||
|
|
|
@ -15,6 +15,10 @@ if [ $1 == 'before' ]; then
|
|||
composer global require "phpunit/phpunit=6.2.*"
|
||||
fi
|
||||
|
||||
if [[ ${RUN_PHPCS} == 1 ]]; then
|
||||
composer install
|
||||
fi
|
||||
|
||||
# Remove Xdebug from PHP runtime for all PHP version except 7.1 to speed up builds.
|
||||
# We need Xdebug enabled in the PHP 7.1 build job as it is used to generate code coverage.
|
||||
if [[ ${RUN_CODE_COVERAGE} != 1 ]]; then
|
||||
|
|
Loading…
Reference in New Issue