github: Fail LGTM test if required environment variables aren't set

Closes strongswan/strongswan#328.
This commit is contained in:
Noel Kuntze 2021-04-15 14:49:19 +02:00 committed by Tobias Brunner
parent cd7b80e869
commit 260e7b55f6
1 changed files with 5 additions and 1 deletions

View File

@ -322,8 +322,12 @@ apidoc)
TARGET=apidoc
;;
lgtm)
if [ -z "$LGTM_PROJECT" -o -z "$LGTM_TOKEN" ]; then
echo "The LGTM_PROJECT and LGTM_TOKEN environment variables" \
"are required to run this test"
exit 1
fi
DEPS="jq"
if test -z "$1"; then
base=$COMMIT_BASE
# after rebases or for new/duplicate branches, the passed base commit