Context
PR #100 makes GitHub-Script's init.ps1 deterministically load the GitHub module version selected via the Version/Prerelease inputs: it removes any already-loaded instances and imports the resolved version with -RequiredVersion -Force -Global. The core guarantee is that a different GitHub module version already imported before the action runs gets replaced by the selected one.
The existing ActionTest matrix covers version selection (exact / range / already-installed), but there is no regression test for the specific scenario the change fixes: a different GitHub module version is already imported into the session before init.ps1 runs.
Request
Add an integration test that:
- Pre-imports a GitHub module version that differs from the one the action will select (e.g.
Import-Module GitHub -RequiredVersion <old> before invoking the action, or via a Prescript/setup step).
- Runs the action with
Version pinned to a different version.
- Asserts that after init the loaded module (
Get-Module GitHub) is exactly the selected version and that no other version remains loaded.
Acceptance criteria
Raised from Copilot review feedback on #100.
Context
PR #100 makes
GitHub-Script'sinit.ps1deterministically load the GitHub module version selected via theVersion/Prereleaseinputs: it removes any already-loaded instances and imports the resolved version with-RequiredVersion -Force -Global. The core guarantee is that a different GitHub module version already imported before the action runs gets replaced by the selected one.The existing
ActionTestmatrix covers version selection (exact / range / already-installed), but there is no regression test for the specific scenario the change fixes: a different GitHub module version is already imported into the session beforeinit.ps1runs.Request
Add an integration test that:
Import-Module GitHub -RequiredVersion <old>before invoking the action, or via aPrescript/setup step).Versionpinned to a different version.Get-Module GitHub) is exactly the selected version and that no other version remains loaded.Acceptance criteria
ActionTestworkflow matrix.Raised from Copilot review feedback on #100.