Skip to content

v6.1.2

Latest

Choose a tag to compare

@github-actions github-actions released this 11 Jul 08:51
d4020f3

🪲 [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.

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 shared PSModule/Install-PSModuleHelpers module as the Import-TestData command, so it no longer has to be checked out from the caller's repository.
  • BeforeAll-ModuleLocal.yml, Test-ModuleLocal.yml, and AfterAll-ModuleLocal.yml each now install PSModule/Install-PSModuleHelpers@v1.0.9 and run Import-TestData (env PSMODULE_TEST_DATA: ${{ secrets.TestData }}) in place of the deleted script.
  • Plan.yml: PSModule/Resolve-PSModuleVersion pinned to v1.1.4, which contains the always-evaluate-labels fix.
  • Build-Site.yml: Install-PSModuleHelpers bumped v1.0.8 → v1.0.9 so the action resolves to a single version across the repo.
  • README.md documents that test data is exposed through Install-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.