🪲 [Fix]: TestData keys reach setup and teardown phases (#394)
TestData values now reach every module-local phase through the same export path. Setup scripts, module tests, and teardown scripts can rely on identical environment variable names for caller-provided secrets and variables, with secret masking preserved.
- Fixes #386
Fixed: Setup and teardown scripts receive TestData keys
BeforeAll-ModuleLocal, Test-ModuleLocal, and AfterAll-ModuleLocal now all call the same local Expose-TestData action after installing the shared helper module. This keeps TestData parsing, validation, masking, and GITHUB_ENV export behavior identical before each phase runs.
Callers continue to use the existing TestData workflow secret; no interface change is required.
Changed: TestData phase parity is documented
The README now states that the same TestData keys are available in setup, test, and teardown phases, and includes troubleshooting guidance for callers that use secrets: inherit without explicitly creating a TestData JSON payload.
Technical Details
- Added
.github/actions/Expose-TestData/action.ymlas the single workflow step wrapper aroundImport-TestData. - Updated
BeforeAll-ModuleLocal.yml,Test-ModuleLocal.yml, andAfterAll-ModuleLocal.ymlto use the shared action. - Added fixture assertions to both workflow test repositories so
PSMODULE_TEST_SINGLELINE_SECRETandPSMODULE_TEST_VARIABLEare checked inBeforeAll.ps1, Pester tests, andAfterAll.ps1. - Implementation plan progress: core shared export path, parity validation, setup/teardown regression coverage, and README guidance are complete.
- Local validation: helper test scripts passed; setup/teardown fixture assertions passed for both test repositories; touched workflow files passed actionlint with the repository's known
job.workflow_repository/job.workflow_shacontext warnings ignored.