dotfiles/.gitlab-ci.yml

34 lines
1,007 B
YAML

---
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
# you can delete this line if you're not using Docker
image: fnichol/check-shell:latest
analyze:
stage: test
before_script:
- shellcheck --version
script:
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
- find . -type f -name '*.sh' | xargs shellcheck
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
- find . -type f -name '*.zsh' | xargs shellcheck -s bash -e SC2034
lint:
stage: test
before_script:
- shfmt -version
script:
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
- 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 .