tests: Add yamllint of the lifted playbooks

This commit is contained in:
Brian C. Lane 2019-08-29 15:28:46 -07:00
parent 4da569442c
commit de314a0046
4 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@ RUN dnf -y install \
libselinux-python3 \ libselinux-python3 \
make \ make \
pykickstart \ pykickstart \
python3-ansible-runner \
python3-coverage \ python3-coverage \
python3-coveralls \ python3-coveralls \
python3-flask \ python3-flask \
@ -33,6 +34,7 @@ RUN dnf -y install \
pbzip2 \ pbzip2 \
squashfs-tools \ squashfs-tools \
qemu-img \ qemu-img \
yamllint \
which && \ which && \
touch /.in-container touch /.in-container
RUN useradd weldr RUN useradd weldr

View File

@ -43,6 +43,8 @@ install: all
check: check:
@echo "*** Running pylint ***" @echo "*** Running pylint ***"
PYTHONPATH=$(PYTHONPATH):./src/ ./tests/pylint/runpylint.py PYTHONPATH=$(PYTHONPATH):./src/ ./tests/pylint/runpylint.py
@echo "*** Running yamllint ***"
./tests/lint-playbooks.sh
test: test:
@echo "*** Running tests ***" @echo "*** Running tests ***"

5
tests/lint-playbooks.sh Executable file
View File

@ -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

1
tests/yamllint.conf Normal file
View File

@ -0,0 +1 @@
line-length: {max: 120, allow-non-breakable-words: true}