]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
github: Fail LGTM test if required environment variables aren't set
authorNoel Kuntze <noel.kuntze@thermi.consulting>
Thu, 15 Apr 2021 12:49:19 +0000 (14:49 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 5 May 2021 16:12:25 +0000 (18:12 +0200)
Closes strongswan/strongswan#328.

scripts/test.sh

index 661b9b46189f969bd62a91e6a72123c5aa31c9d1..536f09464beee4b676e4a956660e5f84585313d6 100755 (executable)
@@ -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