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

View File

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

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}