diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-10-07 01:33:53 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-10-07 01:33:53 +0200 |
commit | 9fc305259b21f8daa377e9ef1159487d8c2d2f82 (patch) | |
tree | 877f86d4aa1898316c5adc6106e3b49094ae9b35 /tests/drone-run-php-tests.sh | |
parent | 941ca99a868971f06ef8678b57520304cd90d277 (diff) |
Do not run tests when PHP files of other types of tests are modified
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/drone-run-php-tests.sh')
-rwxr-xr-x | tests/drone-run-php-tests.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/drone-run-php-tests.sh b/tests/drone-run-php-tests.sh index 9ae87cf9a..4c6611475 100755 --- a/tests/drone-run-php-tests.sh +++ b/tests/drone-run-php-tests.sh @@ -8,7 +8,7 @@ echo "=========================" [[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | wc -l) -eq 0 ]] && echo "No files are modified => merge commit" && exit 0 -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c ".php$") -gt 0 ]] && echo "PHP files are modified" && exit 0 +[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep --invert-match "^tests/" | grep -c ".php$") -gt 0 ]] && echo "PHP files are modified" && exit 0 [[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "^tests/php/") -gt 0 ]] && echo "PHP test files are modified" && exit 0 |