Enable ansible-test in github workflow

This test is using the galaxy_importer from ansible project. The
configuration file galaxy-importer.cfg is copied from linux-system-roles

    https://github.com/linux-system-roles/auto-maintenance/blob/master/\
    lsr_role2collection/galaxy-importer.cfg

The tests script has extra code to parse the output of the importer to
highlight errors and to exit with a proper error code.

The test can be used locally also with "sh tests/sanity/sanity.sh"

New files:
- .github/workflows/ansible-test.yml
- tests/sanity/galaxy-importer.cfg
- tests/sanity/sanity.sh
This commit is contained in:
Thomas Woerner
2022-01-11 13:58:25 +01:00
parent b401ba0354
commit 8fa29a9522
4 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
[galaxy-importer]
RUN_ANSIBLE_TEST = True
RUN_ANSIBLE_LINT = True
ANSIBLE_TEST_LOCAL_IMAGE = True
LOCAL_IMAGE_DOCKER = True