🪲 [Fix]: Test data reaches module tests in every consumer repository (#377)
Module test workflows now receive the caller-provided test data (secrets and variables) in every repository that consumes Process-PSModule, and version resolution once again honors the bump label on pull requests. Previously the BeforeAll, Test, and AfterAll module jobs failed at the "Expose caller-provided test data" step because they ran a script that shipped only inside Process-PSModule's own repository, so no consumer could actually use the TestData secret introduced in v6.0.0.
- Fixes #378
Fixed: Test data now reaches module tests in consumer repositories
The TestData secret (a single-line JSON object of secrets and variables) is now exposed to the BeforeAll, Test, and AfterAll module test jobs in any repository that consumes Process-PSModule. Each job installs the shared helpers and runs the Import-TestData command, which reads the payload, masks the secrets, and publishes every entry as an environment variable for the tests.
The consumer interface is unchanged — callers already pass TestData to workflow.yml (added in v6.0.0), so no migration is required:
secrets:
TestData: >-
{ "secrets": { "TEST_SECRET": "${{ secrets.TEST_SECRET }}" },
"variables": { "TEST_VARIABLE": ${{ toJSON(vars.TEST_VARIABLE) }} } }Secrets arrive masked in the logs; variables arrive verbatim.
Fixed: Bump labels are honored during version resolution on pull requests
Version resolution now always evaluates the Major/Minor/Patch bump label, so a pull request labeled Minor previews the correct next minor version instead of defaulting to a patch prerelease. This is picked up by adopting Resolve-PSModuleVersion v1.1.4.
Technical Details
- Removed
.github/scripts/Expose-TestData.ps1(138 lines); the exposure logic moved into the sharedPSModule/Install-PSModuleHelpersmodule as theImport-TestDatacommand, so it no longer has to be checked out from the caller's repository. BeforeAll-ModuleLocal.yml,Test-ModuleLocal.yml, andAfterAll-ModuleLocal.ymleach now installPSModule/Install-PSModuleHelpers@v1.0.9and runImport-TestData(envPSMODULE_TEST_DATA: ${{ secrets.TestData }}) in place of the deleted script.Plan.yml:PSModule/Resolve-PSModuleVersionpinned to v1.1.4, which contains the always-evaluate-labels fix.Build-Site.yml:Install-PSModuleHelpersbumped v1.0.8 → v1.0.9 so the action resolves to a single version across the repo.README.mddocuments that test data is exposed throughInstall-PSModuleHelpers/Import-TestData.- All action references are pinned to release commit SHAs (IPH v1.0.9 =
8bfb84d557755c67d9b5643efe573bdcae4c1a4a, Resolve v1.1.4 =8d1dac7f326a45ba08060c1e24a5dd6f6f00b3ab); actionlint is clean. - Validated end-to-end on a consumer module: all module test matrix jobs (Linux/Windows/macOS) pass, with a masked secret and a verbatim variable observed in the tests.