Skip to content

Commit dad6619

Browse files
committed
Update test extras
1 parent ecbcd6e commit dad6619

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ matrix:
1515
- php: "7.3"
1616
env: WP_VERSION=latest WP_MULTISITE=0
1717
- php: "7.4"
18-
env: RUN_PHPCS=1 WP_VERSION=latest WP_MULTISITE=0
19-
# Only need to run PHPCS on one test
18+
env: RUN_EXTRA=1 WP_VERSION=latest WP_MULTISITE=0
19+
# Only need to run extras on one test
2020
- php: "7.4"
2121
env: WP_VERSION=latest WP_MULTISITE=1
2222
# n-1 major release
@@ -102,9 +102,9 @@ install:
102102
103103
script:
104104
- npm run test-unit-php
105-
- $( npm bin )/wp-scripts test-e2e --config=./tests/e2e/jest.config.js
106105
- |
107-
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]] && [[ ${RUN_PHPCS} == "1" ]]; then
106+
if [[ ${RUN_EXTRA} == "1" ]]; then
107+
$( npm bin )/wp-scripts test-e2e --config=./tests/e2e/jest.config.js
108108
bash bin/phpcs-diff.sh
109109
npm run lint
110110
fi

bin/phpcs-diff.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ PHPCS_FILE=$(mktemp)
66

77
git remote set-branches --add origin master
88
git fetch
9-
git diff -- '*.php' origin/master... > $DIFF_FILE
9+
git diff -- '*.php' origin/master.. > $DIFF_FILE
1010

11-
$DIR/../vendor/bin/phpcs --standard=phpcs.xml.dist --report=json > $PHPCS_FILE || true
11+
$DIR/../vendor/bin/phpcs --extensions=php --standard=phpcs.xml.dist --report=json > $PHPCS_FILE || true
1212

13-
$DIR/../vendor/bin/diffFilter --phpcs $DIFF_FILE $PHPCS_FILE 0
13+
$DIR/../vendor/bin/diffFilter --phpcs $DIFF_FILE $PHPCS_FILE 0

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
<exclude-pattern>*/node_modules/*</exclude-pattern>
1010
<exclude-pattern>*/nodeapp/*</exclude-pattern>
1111
<exclude-pattern>*/vendor/*</exclude-pattern>
12+
<exclude-pattern>*/wordpress/*</exclude-pattern>
1213
</ruleset>

0 commit comments

Comments
 (0)