diff --git a/Dockerfile.test b/Dockerfile.test index 2ee121ff..fb613104 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -5,6 +5,7 @@ RUN dnf -y install \ libselinux-python3 \ make \ pykickstart \ + python3-ansible-runner \ python3-coverage \ python3-coveralls \ python3-flask \ @@ -33,6 +34,7 @@ RUN dnf -y install \ pbzip2 \ squashfs-tools \ qemu-img \ + yamllint \ which && \ touch /.in-container RUN useradd weldr diff --git a/Makefile b/Makefile index 69992656..2741d457 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,8 @@ install: all check: @echo "*** Running pylint ***" PYTHONPATH=$(PYTHONPATH):./src/ ./tests/pylint/runpylint.py + @echo "*** Running yamllint ***" + ./tests/lint-playbooks.sh test: @echo "*** Running tests ***" diff --git a/tests/lint-playbooks.sh b/tests/lint-playbooks.sh new file mode 100755 index 00000000..d69db828 --- /dev/null +++ b/tests/lint-playbooks.sh @@ -0,0 +1,5 @@ +#!/usr/bin/sh +for f in ./share/lifted/providers/*/playbook.yaml; do + echo "linting $f" + yamllint -c ./tests/yamllint.conf "$f" +done diff --git a/tests/yamllint.conf b/tests/yamllint.conf new file mode 100644 index 00000000..1e07fd63 --- /dev/null +++ b/tests/yamllint.conf @@ -0,0 +1 @@ +line-length: {max: 120, allow-non-breakable-words: true}