You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🪲 [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.yml` as the single
workflow step wrapper around `Import-TestData`.
- Updated `BeforeAll-ModuleLocal.yml`, `Test-ModuleLocal.yml`, and
`AfterAll-ModuleLocal.yml` to use the shared action.
- Added fixture assertions to both workflow test repositories so
`PSMODULE_TEST_SINGLELINE_SECRET` and `PSMODULE_TEST_VARIABLE` are
checked in `BeforeAll.ps1`, Pester tests, and `AfterAll.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_sha` context warnings ignored.
0 commit comments