Skip to content

feat: add direct QEMU, Goss and native Molecule actions - #8

Open
neilime wants to merge 22 commits into
mainfrom
feat/direct-qemu-vm
Open

neilime wants to merge 22 commits into
mainfrom
feat/direct-qemu-vm

Conversation

@neilime

@neilime neilime commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Consumers can test infrastructure through focused actions while keeping environment policy in their own scenarios.

  • Add direct QEMU alongside Lima behind vm/create's backend selector, with explicit configuration, private SSH outputs, startup rollback and verified cleanup.
  • Add checksum-pinned Goss execution to vm/test, including native reports, summaries, PR comments and artifacts. Empty and fully skipped suites fail. Custom guest and runner commands remain supported.
  • Add ansible/test-molecule for native scenarios. It owns pinned runtime setup, bounded execution and report publication. The scenario owns inventory, playbooks, dependencies and sequence; no VM or reboot is required. Interrupted runs retry bounded native cleanup and remain failures.
  • Keep short GitHub Script logic inline. Remove the five entrypoint wrappers and the small Molecule report module; retain adjacent modules for complex validation, execution and VM operations.
  • Dedicate one hosted workflow to each public action: vm/create, vm/test, vm/destroy, ansible/test, and ansible/test-molecule. Keep backend variants inside each action workflow, and run all five in CI. Use test-action-* caller IDs and explicit Arrange/Act/Assert steps following ci-github-common; keep unconditional cleanup separate. Preserve native failures and reports; check rollback before fallback cleanup and verify repeated destruction and unmanaged-data preservation.
  • Organize 53 focused unit tests into seven native suite() blocks with test() cases and explicit Arrange, Act and Assert comments. Each action owns its dependency-free npm package and calls ci-github-nodejs/actions/test with command: test:ci; pretest:ci prepares the coverage directory and test:ci generates a gitignored LCOV report. Unit tests cover input boundaries, ownership, native report integrity and injected failures. Hosted scenarios cover ordinary execution, reporting and cleanup. Shared CI composes the action workflows; make test runs their suites locally and stops on failure.
  • Keep ansible/test for playbook and collection sanity tests. Workflows own the VMs they create and always schedule destruction. Linting stays separate.
  • Record backend choice, action responsibilities, native scenarios and script placement in one consolidated ADR, linked from the existing lifecycle decision.
  • Maintain the Goss release and Linux x86-64 archive checksum together through Renovate's release-attachment datasource, preserving the existing JSON format and runtime pin. Use Renovate's native .node-version manager to group updates across all five action packages.

The Proxmox pilot in digital-household #7 explicitly defines its SSH inventory, baseline application, idempotence and reboot sequence. Released playbook, collection and custom VM command inputs remain supported; the unreleased VM-specific Molecule interface is removed.

Validation: make test passes all 53 focused unit tests in seven suites, with explicit AAA sections in every test. All five action packages retain their dependency-free install and CI coverage scripts. Local lint and documentation links pass. Hosted VM tests also assert private report-directory permissions. Renovate strict configuration validation passes and its native Node version manager detects all five files. Its Goss extractor identifies the live upstream archive checksum, and its replacement logic updates the version and checksum together in a simulated release update. Shared hosted CI passes all 24 jobs at 72acbaa6ca9745cf0811a1a7a685dd12dcc2111b, including all five unit suites running test:ci from their action directories through the released Node.js test action. The Proxmox consumer run passed at c5482db6d1d790bea5d9b2578c89a766240a5912, using shared action revision a752dd6e1d27d80e510ae533ca71c2cb045cabb9; action runtime code is unchanged by the subsequent workflow and documentation changes. Hosted scenarios cover operation without a VM, deliberate failures, timeouts, Lima/QEMU, idempotence, reboot, native reporting and cleanup.

Intended for release 0.3.0 after review and shared/consumer qualification. Consumers must replace preview pins with the reviewed release commit before merge.

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

@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

QEMU guest reports

QEMU guest reports

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

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

QEMU runner reports

QEMU runner reports

Test Results

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

❌ Pass Rate: 0.0%

Failed Tests
  • expected-failure (suite: Unknown Suite)
    • Error: Synthetic failure

@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

github-actions Bot commented Oct 31, 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 ✅
RENOVATE 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 - 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 - 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 - 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% 🟢
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

@neilime
neilime marked this pull request as ready for review October 31, 2026 11:34
@github-actions

Copy link
Copy Markdown

Goss - __test-actions-qemu.yml - valid - 0

Goss - __test-actions-qemu.yml - valid - 0

Test Results

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

✅ Pass Rate: 100.0%

@github-actions

Copy link
Copy Markdown

Goss - __test-actions-qemu.yml - invalid - 0

Goss - __test-actions-qemu.yml - invalid - 0

Test Results

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

❌ Pass Rate: 0.0%

Failed Tests
  • File /iac-missing-synthetic-file exists (suite: goss)
    • Error: Test failed

@github-actions

Copy link
Copy Markdown

Goss - __test-actions-qemu.yml - empty - 0

Goss - __test-actions-qemu.yml - empty - 0

Test Results

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

❌ Pass Rate: 0.0%

Failed Tests
  • consumer-command (suite: disposable-vm)
    • Error: Guest assertions or report collection failed; inspect test outputs

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Molecule - success

Molecule - success

Test Results

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

✅ Pass Rate: 100.0%

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Molecule - assertion-failure

Molecule - assertion-failure

Test Results

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

❌ Pass Rate: 60.0%

Failed Tests
  • scenario (suite: molecule)
    • Error: Molecule failed, timed out or produced no native assertions
  • [smoke] Verify the disposable test configuration: Assert the expected content (suite: verify)
    • File: tests/fixture/molecule/smoke/verify.yml:10
    • Error: Task failed: Action failed: Assertion failed

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Molecule - idempotence-failure

Molecule - idempotence-failure

Test Results

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

❌ Pass Rate: 83.3%

Failed Tests
  • scenario (suite: molecule)
    • Error: Molecule failed, timed out or produced no native assertions

@github-actions

Copy link
Copy Markdown

Lima state - success

Lima state - success

Test Results

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

✅ Pass Rate: 100.0%

@github-actions

Copy link
Copy Markdown

Lima state - assertion-failure

Lima state - assertion-failure

Test Results

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

✅ Pass Rate: 100.0%

@neilime neilime changed the title feat(vm): support direct QEMU and runner-side tests feat(vm): add direct QEMU and opinionated Goss and Molecule tests Oct 31, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Molecule local scenario - success

Molecule local scenario - success

Test Results

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

✅ Pass Rate: 87.5%

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Molecule local scenario - failure

Molecule local scenario - failure

Test Results

Status Count
✅ Passed 4
❌ Failed 2
⏭️ Skipped 1
Total 7

❌ Pass Rate: 57.1%

Failed Tests
  • [local-fixture] Verify the local test resource: Assert configuration and selected outcome (suite: assertions)
    • File: tests/fixture/molecule/local/assertions.yml:14
    • Error: Task failed: Action failed: Assertion failed
  • scenario (suite: molecule)
    • Error: Molecule failed, timed out or produced no native assertions

@neilime neilime changed the title feat(vm): add direct QEMU and opinionated Goss and Molecule tests feat: add direct QEMU, Goss and native Molecule actions Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Molecule local scenario - timeout

Molecule local scenario - timeout

Test Results

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

❌ Pass Rate: 75.0%

Failed Tests
  • scenario (suite: molecule)
    • Error: Molecule failed, timed out or produced no native assertions

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Goss - vm/test - qemu - valid

Goss - vm/test - qemu - valid

Test Results

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

✅ Pass Rate: 100.0%

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Goss - vm/test - qemu - invalid

Goss - vm/test - qemu - invalid

Test Results

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

❌ Pass Rate: 0.0%

Failed Tests
  • File /iac-missing-synthetic-file exists (suite: goss)
    • Error: Test failed

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Goss - vm/test - qemu - empty

Goss - vm/test - qemu - empty

Test Results

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

❌ Pass Rate: 0.0%

Failed Tests
  • consumer-command (suite: disposable-vm)
    • Error: Guest assertions or report collection failed; inspect test outputs

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