Merge pull request #427 from rjeffman/ci_ansible-doc-test_action

Add action to verify Ansible documentation on each commit or PR.
This commit is contained in:
Thomas Woerner
2020-11-18 10:09:56 +01:00
committed by GitHub
2 changed files with 20 additions and 1 deletions

16
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
---
name: Verify Ansible documentation.
on:
- push
- pull_request
jobs:
check_docs:
name: Check Ansible Documentation.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Run ansible-doc-test
run: ANSIBLE_LIBRARY="." python utils/ansible-doc-test roles plugins

View File

@@ -124,7 +124,10 @@ def ansible_doc_test(path, verbose):
# All roles and plugins
roles = os.listdir("roles/")
for _role in roles:
if not os.path.isdir("roles/%s" % _role):
if (
not os.path.isdir("roles/%s" % _role)
or not os.path.isdir("roles/%s/library" % _role)
):
continue
modules = os.listdir("roles/%s/library" % _role)
for _module in modules: