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 .