🪲 [Fix]: TestData keys reach setup and teardown phases#394
Merged
Marius Storhaug (MariusStorhaug) merged 2 commits intoJul 16, 2026
Merged
Conversation
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
July 16, 2026 20:30
Marius Storhaug (MariusStorhaug)
deleted the
fix/386-testdata-module-local-parity
branch
July 16, 2026 20:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Fixed: Setup and teardown scripts receive TestData keys
BeforeAll-ModuleLocal,Test-ModuleLocal, andAfterAll-ModuleLocalnow all call the same localExpose-TestDataaction after installing the shared helper module. This keeps TestData parsing, validation, masking, andGITHUB_ENVexport behavior identical before each phase runs.Callers continue to use the existing
TestDataworkflow 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: inheritwithout explicitly creating aTestDataJSON payload.Technical Details
.github/actions/Expose-TestData/action.ymlas the single workflow step wrapper aroundImport-TestData.BeforeAll-ModuleLocal.yml,Test-ModuleLocal.yml, andAfterAll-ModuleLocal.ymlto use the shared action.PSMODULE_TEST_SINGLELINE_SECRETandPSMODULE_TEST_VARIABLEare checked inBeforeAll.ps1, Pester tests, andAfterAll.ps1.job.workflow_repository/job.workflow_shacontext warnings ignored.