Skip to content

Commit 39864d1

Browse files
Document TestData migration path
1 parent 06d6d85 commit 39864d1

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,33 @@ credentials that are exposed. `secrets: inherit` is intentionally not required.
405405
| `APIKey` | GitHub secrets | The API key for the PowerShell Gallery, used to publish the module. | Yes |
406406
| `TestData` | GitHub secrets | A single-line JSON object with `secrets` and `variables` maps, exposed as environment variables to the module test jobs. Values under `secrets` are masked; values under `variables` are not. | No |
407407

408+
#### Breaking change: fixed test secrets moved to `TestData`
409+
410+
The reusable workflow no longer declares or accepts the old fixed test-secret inputs:
411+
412+
- `TEST_APP_ENT_CLIENT_ID`
413+
- `TEST_APP_ENT_PRIVATE_KEY`
414+
- `TEST_APP_ORG_CLIENT_ID`
415+
- `TEST_APP_ORG_PRIVATE_KEY`
416+
- `TEST_USER_ORG_FG_PAT`
417+
- `TEST_USER_USER_FG_PAT`
418+
- `TEST_USER_PAT`
419+
420+
If a caller passed any of these secrets directly, move them into the `secrets` map inside `TestData`.
421+
The environment variable names used by the tests can stay the same; only the workflow-call interface
422+
changes:
423+
424+
```yaml
425+
jobs:
426+
Process-PSModule:
427+
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
428+
secrets:
429+
APIKey: ${{ secrets.APIKEY }}
430+
TestData: >-
431+
{ "secrets": { "TEST_USER_PAT": "${{ secrets.TEST_USER_PAT }}",
432+
"TEST_APP_ORG_CLIENT_ID": "${{ secrets.TEST_APP_ORG_CLIENT_ID }}" } }
433+
```
434+
408435
#### Passing test data (secrets and variables) to the tests
409436

410437
A single `TestData` secret lets a module expose any number of caller-defined values to its test jobs

0 commit comments

Comments
 (0)