Add yamllint and ansible-lint tests
This commit is contained in:
parent
c69c56f0ca
commit
1fa12d4f13
4 changed files with 26 additions and 0 deletions
7
tests/00-selfsanity.sh
Normal file
7
tests/00-selfsanity.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
find . -maxdepth 1 -type f -name "*.sh" -print0 | xargs -0 -t -n 1 shellcheck -
|
7
tests/01-yamllint.sh
Normal file
7
tests/01-yamllint.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")/.." || exit 1
|
||||
|
||||
find . -type f -name "*.yml" -print0 | xargs -0 -t -n 1 yamllint -s --
|
8
tests/02-ansible-lint.sh
Normal file
8
tests/02-ansible-lint.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")/../roles" || exit 1
|
||||
|
||||
find . -mindepth 1 -maxdepth 1 -type d '!' -name ".*" -print0 | \
|
||||
xargs -0 -t -n 1 ansible-lint -x 701 --
|
4
tests/Makefile
Normal file
4
tests/Makefile
Normal file
|
@ -0,0 +1,4 @@
|
|||
.PHONY = all
|
||||
|
||||
all:
|
||||
@for x in *.sh ; do sh "$$x" || exit 1 ; done
|
Loading…
Add table
Reference in a new issue