diff --git a/.drone.yml b/.drone.yml index c550839b3e299..ac8b4bf684fc5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2213,6 +2213,7 @@ steps: - name: nodb-codecov image: nextcloudci/php7.1:php7.1-16 commands: + - bash tests/drone-run-coverage.sh || exit 0 - phpenmod xdebug - TEST_SELECTION=NODB ./autotest.sh sqlite - wget https://codecov.io/bash -O codecov.sh @@ -2243,6 +2244,7 @@ steps: - name: db-codecov image: nextcloudci/php7.1:php7.1-16 commands: + - bash tests/drone-run-coverage.sh || exit 0 - phpenmod xdebug - TEST_SELECTION=QUICKDB ./autotest.sh sqlite - wget https://codecov.io/bash -O codecov.sh diff --git a/tests/drone-run-coverage.sh b/tests/drone-run-coverage.sh new file mode 100755 index 0000000000000..58c4bbb9baffc --- /dev/null +++ b/tests/drone-run-coverage.sh @@ -0,0 +1,11 @@ +#!/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 + +exit 1