test: Add guard when no commit needs testing

Without this patch, github actions fail.

It's a temporary workaround until [1] is done.

[1]: https://github.com/purpleidea/mgmt/issues/643
This commit is contained in:
Jean-Philippe Evrard
2021-03-03 10:49:22 +01:00
parent 35a8062b58
commit 1873e022cc

View File

@@ -134,12 +134,12 @@ then
head="" head=""
fi fi
commits=$(git log --no-merges --format=%H origin/${ref}..${head}) commits=$(git log --no-merges --format=%H origin/${ref}..${head})
[[ -n "$commits" ]] if [[ -n "$commits" ]]; then
for commit in $commits
for commit in $commits do
do test_commit_message $commit
test_commit_message $commit test_commit_message_common_bugs $commit
test_commit_message_common_bugs $commit done
done fi
fi fi
echo 'PASS' echo 'PASS'