Add bats unit testing to repository
Will recursively look for `*.bats` files and run them with bats-core test suite. Simple sample unit tests for existing scripts are included in `.config/shell/rc.d/test`.
This commit is contained in:
parent
beb5f1c323
commit
b11343b73a
5 changed files with 50 additions and 1 deletions
|
|
@ -24,3 +24,13 @@ lint:
|
|||
- 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: alpine
|
||||
before_script:
|
||||
- apk add git bash
|
||||
- git clone https://github.com/bats-core/bats-core.git /bats
|
||||
- /bats/bin/bats --version
|
||||
script:
|
||||
- /bats/bin/bats -r .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue