Skip to content

Commit cf7d210

Browse files
Define optional test data mapping
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 8346ad0 commit cf7d210

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

docs/content/reference/process-workflow-fleet-standard.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,16 @@ jobs:
125125
GitHubAppPrivateKey: ${{ secrets.SHELLY_PRIVATE_KEY }}
126126
```
127127
128+
Modules whose local tests require repository-specific data may add the optional secret mapping:
129+
130+
```yaml
131+
TestData: >-
132+
{"secrets":{"TOKEN":"${{ secrets.TEST_TOKEN }}"},"variables":{"ENDPOINT":"${{ vars.TEST_ENDPOINT }}"}}
133+
```
134+
135+
The reusable workflow exports only the declared entries to module-local test setup, tests, and teardown. Callers omit
136+
`TestData` when no module-local test data is required.
137+
128138
This YAML is a recommendation derived from the v8 interface and fleet evidence. It is not an approved standard.
129139
Issue [#514](https://github.com/PSModule/Process-PSModule/issues/514) must record agreement on the following structural
130140
decisions before canonical guides, templates, or consumer workflows adopt it:
@@ -137,7 +147,7 @@ decisions before canonical guides, templates, or consumer workflows adopt it:
137147
| Concurrency | Use the workflow plus PR-number-or-full-ref key and cancel only pull-request runs. | Selected for the candidate: PR reconciliation must be resumable; non-PR runs serialize by full ref. |
138148
| Permissions | Default deny at workflow level, then grant the caller job `contents: read`, `pages: write`, and `id-token: write`. | Selected for the candidate: use `GITHUB_TOKEN` for repository-local, non-user-facing platform operations and App tokens for user-facing or otherwise unsupported operations. |
139149
| Fork behavior | Keep the caller unconditional; classify fork pull requests as restricted read-only validation in `Plan`. | Selected for the candidate; execution policy belongs to Process-PSModule rather than every consumer. |
140-
| Credentials | Explicitly map the three v8 credentials. | Define a narrower credential profile for repositories that cannot publish. |
150+
| Credentials | Explicitly map the three v8 credentials; optionally map `TestData` when module-local tests need it. | Define a narrower credential profile for repositories that cannot publish. |
141151
| Optional surface | Permit only documented `TestData`, workflow inputs, schedule timing, and presentation metadata. | Allow additional extension points after naming and compatibility rules are agreed. |
142152

143153
The `v8` reference is the controlled moving major tag for this PSModule-owned workflow. On 2026-08-15, `v8`, `v8.0`,
@@ -187,14 +197,16 @@ These are evidence-based candidate variations, not approved policy.
187197

188198
| Option | When it is appropriate | Constraint |
189199
| --- | --- | --- |
190-
| `TestData` secret | Module-local tests need caller-defined secrets or variables. | Use the documented compact single-line JSON object and expose only required values. |
200+
| `TestData` secret | Module-local tests need caller-defined secrets or variables. | Optionally map the documented JSON object with separate `secrets` and `variables` maps, exposing only required values. |
191201
| `with.SettingsPath` | The settings file is not `.github/PSModule.yml`. | Prefer the standard path for normal module repositories. |
192202
| `with.WorkingDirectory` | The module is intentionally rooted below the repository root. | Keep the default `.` for the standard layout. |
193203
| `with.ImportantFilePatterns` | A caller must override change detection at the workflow boundary. | Prefer stable configuration in `.github/PSModule.yml`; the supplied list replaces all defaults. |
194-
| `with.Debug`, `Verbose`, `Version`, or `Prerelease` | A deliberate diagnostic or dependency-selection scenario needs it. | Do not hard-code temporary diagnostics into the fleet baseline. |
204+
| `with.Verbose`, `Version`, or `Prerelease` | A deliberate diagnostic or dependency-selection scenario needs it. | Do not hard-code temporary diagnostics into the fleet baseline. |
195205
| Schedule time | Health runs need staggering or a repository-specific maintenance window. | Keep at least one documented schedule unless the repository records why health runs are unnecessary. |
196206
| `run-name` | A repository needs clearer run presentation. | Presentation must not change job names or routing behavior. |
197207

208+
Conforming callers do not set `with.Debug: true`; the reusable workflow default remains `false`.
209+
198210
## Variations requiring a decision
199211

200212
The following differ from the candidate. They are inventory classifications, not policy violations, until #514 records

0 commit comments

Comments
 (0)