gitlab-ci: add a shellcheck test

Now that we have some shellcheck support, might as well run it in
CI.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0f72cef..2d55c6d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -429,3 +429,16 @@
   before_script:
     - apk -U add bash make perl gcc
   allow_failure: true
+
+check-shellcheck:
+  extends: .intree_template
+  stage: build
+  image: python:3.10-alpine
+  needs: []
+  script:
+    - ./configure --arch=x86_64
+    - make -s shellcheck 2>&1 | tee shellcheckwarnings.txt
+    - test -z `cat shellcheckwarnings.txt`
+  before_script:
+    - apk -U add bash make gcc shellcheck
+  allow_failure: true