From bf231783142af24f7e63e8bf5a00af6d95f63ad9 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 24 Jul 2019 10:55:01 +0200 Subject: [PATCH] [gitlab] Let shellcheck choose sh version --- .gitlab-ci.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 583c737..ddeb2a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,17 +5,17 @@ # you can delete this line if you're not using Docker image: fnichol/check-shell:latest -shellcheck: +analyze: stage: test before_script: - shellcheck --version script: - echo "--------- CHECKING POSIX SHELLSCRIPTS -------------" - - find . -type f -name '*.sh' | xargs shellcheck -s sh + - find . -type f -name '*.sh' | xargs shellcheck - echo "--------- CHECKING ZSH SHELLSCRIPTS -------------" - - find . -type f -name '*.zsh' | xargs shellcheck -s bash + - find . -type f -name '*.zsh' | xargs shellcheck -s bash -e SC2034 -shfmt: +lint: stage: test before_script: - shfmt -version @@ -24,3 +24,11 @@ shfmt: - find . -type f -name '*.sh' | xargs shfmt -d -i 2 - echo "--------- CHECKING ZSH SHELLSCRIPTS -------------" - find . -type f -name '*.zsh' | xargs shfmt -d -i 2 + +test: + stage: test + image: bats/bats:latest + before_script: + - bats --version + script: + - bats -r .