| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Make the setup entrypoint import-safe and cover its validation, installation sequencing, post-install collaborators, caching, and failure handling directly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5ba8975-a9ac-4d2c-b41d-97c99689d1bd
There was a problem hiding this comment.
This pull request refactors the setup action entrypoint to be testable without executing on module import, and adds a focused orchestration unit test suite to prevent regressions in input parsing and collaborator sequencing.
Changes:
| File | Description |
|---|---|
| src/setup-java.ts | Exports run() and conditionally executes it only when invoked as the entrypoint. |
| dist/setup/index.js | Updates the bundled runtime to match the new exported/guarded entrypoint behavior. |
| __tests__/setup-java.test.ts | Adds direct unit tests for setup orchestration using mocked collaborators and inputs. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description:
The setup action entrypoint previously executed on import, preventing focused tests of its orchestration. This exports run() and guards execution with the same ESM entrypoint check used by the cleanup action, then adds mocked unit coverage for input validation, version-file inference, JDK and Maven toolchain ordering, post-install sequencing, caching, and failure handling.
The checked-in setup bundle is regenerated so runtime behavior matches the source.
Related issue:
Fixes: #1158
Check list: