diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2019-08-27 18:12:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-27 18:12:40 +0200 |
commit | caf32d25f8635c86ed9c230dc495a4cf6afbfe3a (patch) | |
tree | fc0b0680f1e3af8b9e5b99efca87b29af4cead26 /tests | |
parent | 495f94e55865b374eddec8428044581c26a4ea26 (diff) | |
parent | 23a0cbe6efe55b65dfc12e7b9f1e1966ec3cd40f (diff) | |
download | nextcloud-server-caf32d25f8635c86ed9c230dc495a4cf6afbfe3a.tar.gz nextcloud-server-caf32d25f8635c86ed9c230dc495a4cf6afbfe3a.zip |
Merge pull request #16879 from only-run-integration-tests-on-php-changes
Only run integration tests when PHP was modified
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/drone-run-integration-tests.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/drone-run-integration-tests.sh b/tests/drone-run-integration-tests.sh new file mode 100755 index 00000000000..9da224ccbad --- /dev/null +++ b/tests/drone-run-integration-tests.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "=========================" +echo "= List of changed files =" +echo "=========================" +git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA +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 -c "^build/integration/") -gt 0 ]] && echo "Integration test files are modified" && exit 0 + +exit 1 |