From 260e7b55f60c47ee6ac820c97a251749955e433d Mon Sep 17 00:00:00 2001 From: Noel Kuntze Date: Thu, 15 Apr 2021 14:49:19 +0200 Subject: [PATCH] github: Fail LGTM test if required environment variables aren't set Closes strongswan/strongswan#328. --- scripts/test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 661b9b461..536f09464 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -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