Skip to content

[P3] CI duplicate download/run-test blocks across 5 jobs in test.yml — consolidate into the toolchain composite action #347

Description

@itsmiso-ai

Ask: Extract the repeated Godot download/install and run-test-suite steps in test.yml into one reusable composite action and have every job call it.
Expected files: .github/workflows/test.yml, .github/actions/load-godot-toolchain/action.yml

Problem:
The CI workflow re-implements the same "download Godot → verify binary → install system deps → run headless smoke test → run all tests/test_*.gd suites" sequence in nearly identical form across five jobs (smoke-test, script-tests, macos-validation, and both Linux export-validation jobs each also download/install templates). A composite action already exists (load-godot-toolchain) but it only resolves version/URL/checksum outputs; the download, unzip, chmod, dependency-install, and the test-suite loop are copy-pasted per job. This makes workflow edits error-prone (a change must be applied in 5+ places) and the OS-specific variants (macos-latest vs ubuntu-latest) drift out of sync — as seen where the macOS job already needs a separate subprocess-based smoke-test wrapper with continue-on-error.

Evidence:

  • .github/workflows/test.ymlsmoke-test:10, script-tests:53, macos-validation:96, export-validation:184, export-validation-windows:236, export-validation-macos:289, export-validation-web:341
  • The "Download Godot" + "Verify Godot binary" + "Install Godot system dependencies" + "Run headless smoke test" + "Run all test suites" blocks are repeated (the run-tests loop appears in both script-tests and macos-validation; the macOS smoke-test additionally reappears as an inline python wrapper at the macos-validation job).
  • .github/actions/load-godot-toolchain/action.yml — currently only emits config outputs; it does not perform the download/install.

Acceptance:

  • A single composite action (or a shared job template) performs the download, checksum verification, install, and test-suite loop for a given platform/version.
  • Each job in test.yml invokes the shared step with the minimal platform-specific inputs (linux_url vs macos_url, template install as needed).
  • test.yml has no more than one copy of the run-all-tests suite loop and no more than one copy of the Linux download/install steps.
  • CI for all five validation jobs (smoke, script-tests, macOS, export Linux/Windows/macOS/Web) still passes green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/foreman-coderForeman coding loop worker.area/opsOperations and release processauditAudit, review, or investigation work.needs-humanHuman input or decision is required.priority/p3Low priority.status/doneWork is complete.tech-debtTechnical debt from audits.type/choreChore or maintenance.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions