From 0a7fef627229f83296ab67e1ae9ac74399957ab8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 30 Oct 2020 09:47:27 +0100 Subject: [PATCH] Also run all tests when drone config is modified Signed-off-by: Joas Schilling --- tests/drone-run-integration-tests.sh | 2 ++ tests/drone-run-php-tests.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/drone-run-integration-tests.sh b/tests/drone-run-integration-tests.sh index 605e1eb356..9b610d0172 100755 --- a/tests/drone-run-integration-tests.sh +++ b/tests/drone-run-integration-tests.sh @@ -8,6 +8,8 @@ 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 ".yml") -gt 0 ]] && echo "YML files are modified" && exit 0 + [[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c ".xml") -gt 0 ]] && echo "info.xml files are modified" && 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 diff --git a/tests/drone-run-php-tests.sh b/tests/drone-run-php-tests.sh index 9552141adc..0a215f7bf3 100755 --- a/tests/drone-run-php-tests.sh +++ b/tests/drone-run-php-tests.sh @@ -8,6 +8,8 @@ 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 ".yml") -gt 0 ]] && echo "YML files are modified" && exit 0 + [[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c ".xml") -gt 0 ]] && echo "info.xml files are modified" && 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