Skip to content

feat(ansible): add standalone validation and reporting action - #5

Merged
neilime merged 10 commits into
mainfrom
feat/ansible-test-action
Oct 29, 2026
Merged

neilime merged 10 commits into
mainfrom
feat/ansible-test-action

Conversation

@neilime

@neilime neilime commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Add a standalone actions/ansible/test that executes explicit test playbooks through dawidd6/action-ansible-playbook and collection sanity through ansible-community/ansible-test-gh-action. Linting stays in the existing linter workflow. Hoverkraft reporting actions publish native JUnit results as summaries, annotations, PR comments and artifacts, including after test failures.

The action reads the consumer's exact Ansible Core requirement. Test playbooks run with that version in a temporary virtual environment and Ansible's built-in JUnit callback. Collection tests use the corresponding Ansible Git tag and can select the consumer's supported Python runtime. Adjacent JavaScript validates inputs and collects reports; no custom test runner or report generator is introduced.

Consumers explicitly select test-playbook or one collection, with a matrix for multiple targets. The collection action is pinned to a maintained upstream commit whose nested actions use full SHAs; its latest tagged release is rejected by workstation-manager's transitive pinning policy. No release is included.

Validation: 45 unit tests, local lint, generated documentation and local link checks passed. Hosted playbook and collection success/failure scenarios verify native reporting and artifacts; current results are available in this PR's checks.

@github-actions

Copy link
Copy Markdown

Hi, thank you for creating your PR, we will check it out very soon

@github-actions

Copy link
Copy Markdown

Ansible tests - syntax-failure

Ansible tests - syntax-failure

Test Results

Status Count
✅ Passed 2
❌ Failed 1
⏭️ Skipped 0
Total 3

❌ Pass Rate: 66.7%

Failed Tests
  • tests/fixture/ansible/selected.yml (suite: Ansible)
    • File: ansible.syntax
    • Error: Ansible check failed. See the execution log.

Lint Checks

Severity Count
❌ Errors 1
⚠️ Warnings 0
Total 1
Errors
  • tests/fixture/ansible/selected.yml:4:7 - Syntax check failed for tests/fixture/ansible/selected.yml. See the execution log.
    • Rule: ansible-syntax

@github-actions

Copy link
Copy Markdown

Ansible tests - success

Ansible tests - success

Test Results

Status Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 0
Total 3

✅ Pass Rate: 100.0%

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Super-linter summary

Language Validation result
BIOME_FORMAT Pass ✅
BIOME_LINT Pass ✅
CHECKOV Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_COMMITLINT Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
MARKDOWN Pass ✅
MARKDOWN_PRETTIER Pass ✅
NATURAL_LANGUAGE Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
YAML Pass ✅
YAML_PRETTIER Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter
Super-linter revision: 2da136927bd4a73596db63044b504547c62cb854
Super-linter version: 9.0.0

@github-actions

Copy link
Copy Markdown

VM tests - success - first

VM tests - success - first

Test Results

Status Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1

✅ Pass Rate: 100.0%

@github-actions

Copy link
Copy Markdown

VM tests - assertion-failure - first

VM tests - assertion-failure - first

Test Results

Status Count
✅ Passed 0
❌ Failed 1
⏭️ Skipped 0
Total 1

❌ Pass Rate: 0.0%

Failed Tests
  • deliberate-failure (suite: guest-fixture)
    • File: ./tests/fixture/fail.sh
    • Error: Synthetic assertion failure

@github-actions

Copy link
Copy Markdown

VM tests - success - repeated

VM tests - success - repeated

Test Results

Status Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1

✅ Pass Rate: 100.0%

Coverage

Metric Covered Total Percentage
Lines 1 1 100.00%

Overall: 100.00% 🟢
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

@github-actions

Copy link
Copy Markdown

VM tests - assertion-failure - repeated

VM tests - assertion-failure - repeated

Test Results

Status Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1

✅ Pass Rate: 100.0%

Coverage

Metric Covered Total Percentage
Lines 1 1 100.00%

Overall: 100.00% 🟢
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

@github-actions

Copy link
Copy Markdown

Ansible tests - syntax - success

Ansible tests - syntax - success

@github-actions

Copy link
Copy Markdown

Ansible tests - syntax - failure

Ansible tests - syntax - failure

Lint Checks

Severity Count
❌ Errors 1
⚠️ Warnings 0
Total 1
Errors
  • tests/fixture/ansible/selected.yml:4:7 - couldn't resolve module/action 'unknown_fixture_module'. This often indicates a misspelling, missing collection, or incorrect module path.
    • Rule: syntax-check[unknown-module]

@github-actions

Copy link
Copy Markdown

Ansible tests - sanity - success

Ansible tests - sanity - success

Test Results

Status Count
✅ Passed 7
❌ Failed 0
⏭️ Skipped 27
Total 34

✅ Pass Rate: 20.6%

@github-actions

Copy link
Copy Markdown

Ansible tests - sanity - failure

Ansible tests - sanity - failure

Test Results

Status Count
✅ Passed 6
❌ Failed 1
⏭️ Skipped 27
Total 34

❌ Pass Rate: 17.6%

Failed Tests
  • yamllint (suite: ansible-test)
    • File: sanity
    • Error: The test `ansible-test sanity --test yamllint` failed with 2 errors:

@github-actions

Copy link
Copy Markdown

Ansible tests - playbook - success

Ansible tests - playbook - success

Test Results

Status Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1

✅ Pass Rate: 100.0%

@github-actions

Copy link
Copy Markdown

Ansible tests - playbook - failure

Ansible tests - playbook - failure

Test Results

Status Count
✅ Passed 0
❌ Failed 1
⏭️ Skipped 0
Total 1

❌ Pass Rate: 0.0%

Failed Tests
  • [localhost] Exercise a synthetic Ansible test assertion: Assert the selected fixture succeeds (suite: valid)
    • File: tests/fixture/ansible/valid.yml:7
    • Error: Task failed: Action failed: Assertion failed

@neilime
neilime marked this pull request as ready for review October 29, 2026 17:08
@neilime
neilime merged commit 5c4b730 into main Oct 29, 2026
32 checks passed
@neilime
neilime deleted the feat/ansible-test-action branch October 29, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant