summaryrefslogtreecommitdiffstats
path: root/tests/drone-run-acceptance-tests.sh
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-07-25 12:17:33 +0200
committerJoas Schilling <coding@schilljs.com>2019-07-25 12:17:33 +0200
commit9b6c43e062a522a98bc3da39e06ae2346e5e113a (patch)
treeefb58ccead90bc4461c299ba1de341c671ad8019 /tests/drone-run-acceptance-tests.sh
parentf50b75f7a199ea75a8f14fb964ee3a59fc7d8f42 (diff)
Run all tests on merges
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/drone-run-acceptance-tests.sh')
-rwxr-xr-xtests/drone-run-acceptance-tests.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/drone-run-acceptance-tests.sh b/tests/drone-run-acceptance-tests.sh
index c52320557..216715cdc 100755
--- a/tests/drone-run-acceptance-tests.sh
+++ b/tests/drone-run-acceptance-tests.sh
@@ -6,6 +6,8 @@ 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 "^tests/acceptance/") -gt 0 ]] && echo "Acceptance test files are modified" && exit 0