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
Copy file name to clipboardExpand all lines: src/docs/PowerShell/Modules/Standards.md
+68-25Lines changed: 68 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,32 +114,77 @@ For large work, open a release branch and target it from feature branches. Apply
114
114
115
115
## CI/CD pipeline
116
116
117
-
The [Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow orchestrates the full lifecycle. Every PR triggers a **Plan** job that resolves configuration and version, then conditionally runs build, test, lint, and publish stages.
118
-
119
-
### Pipeline stages
117
+
The [Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow orchestrates the full lifecycle. The repository entry workflow starts the **Plan** job, `Plan` loads `.github/PSModule.yml`, and `Plan` then conditionally starts the build, test, lint, docs, and publish sub-jobs.
120
118
121
119
```mermaid
122
120
graph LR
123
-
Plan --> Lint-Repository
124
-
Plan --> Build-Module
125
-
Plan --> Test-SourceCode
126
-
Plan --> Lint-SourceCode
127
-
Build-Module --> Test-Module
128
-
Build-Module --> BeforeAll-ModuleLocal
129
-
BeforeAll-ModuleLocal --> Test-ModuleLocal
130
-
Test-ModuleLocal --> AfterAll-ModuleLocal
131
-
Test-SourceCode --> Get-TestResults
132
-
Test-Module --> Get-TestResults
133
-
Test-ModuleLocal --> Get-TestResults
134
-
Test-Module --> Get-CodeCoverage
135
-
Test-ModuleLocal --> Get-CodeCoverage
136
-
Get-TestResults --> Publish-Module
137
-
Get-CodeCoverage --> Publish-Module
138
-
Build-Module --> Build-Docs
139
-
Build-Docs --> Build-Site
140
-
Build-Site --> Publish-Site
121
+
subgraph Inputs
122
+
Workflow[workflow.yml]
123
+
PSModule[.github/PSModule.yml]
124
+
end
125
+
126
+
subgraph Planning
127
+
Plan
128
+
end
129
+
130
+
subgraph Validation
131
+
Lint-Repository
132
+
Build-Module
133
+
Test-SourceCode
134
+
Lint-SourceCode
135
+
Test-Module
136
+
BeforeAll-ModuleLocal
137
+
Test-ModuleLocal
138
+
AfterAll-ModuleLocal
139
+
Get-TestResults
140
+
Get-CodeCoverage
141
+
end
142
+
143
+
subgraph Documentation
144
+
Build-Docs
145
+
Build-Site
146
+
Publish-Site
147
+
end
148
+
149
+
subgraph Release
150
+
Publish-Module
151
+
end
152
+
153
+
Workflow --> Plan
154
+
PSModule --> Plan
155
+
Plan --> Lint-Repository
156
+
Plan --> Build-Module
157
+
Plan --> Test-SourceCode
158
+
Plan --> Lint-SourceCode
159
+
Build-Module --> Test-Module
160
+
Build-Module --> BeforeAll-ModuleLocal
161
+
BeforeAll-ModuleLocal --> Test-ModuleLocal
162
+
Test-ModuleLocal --> AfterAll-ModuleLocal
163
+
Test-SourceCode --> Get-TestResults
164
+
Test-Module --> Get-TestResults
165
+
Test-ModuleLocal --> Get-TestResults
166
+
Test-Module --> Get-CodeCoverage
167
+
Test-ModuleLocal --> Get-CodeCoverage
168
+
Get-TestResults --> Publish-Module
169
+
Get-CodeCoverage --> Publish-Module
170
+
Build-Module --> Build-Docs
171
+
Build-Docs --> Build-Site
172
+
Build-Site --> Publish-Site
141
173
```
142
174
175
+
Read the workflow as one flow from left to right:
176
+
177
+
1.**The entry workflow and module settings feed Plan first.**`workflow.yml` invokes the Process-PSModule workflow, `Plan` loads `.github/PSModule.yml`, evaluates changed files against `ImportantFilePatterns`, determines `ReleaseType` from PR labels, and resolves the next semantic version before any child job starts.
178
+
2.**Non-impacting changes stop here.** If no changed file matches the important patterns, the workflow resolves `ReleaseType: None` and skips build, test, and publish work.
179
+
3.**Repository lint runs for PR hygiene.**`Lint-Repository` checks the repo-level files such as Markdown, YAML, and other non-module assets.
180
+
4.**Module build creates the release candidate artifact.**`Build-Module` compiles the module and stamps the resolved version into the manifest so the artifact under test is the same version that would later be published.
181
+
5.**Source and module tests fan out from the build plan.**`Test-SourceCode` validates raw source files, `Test-Module` validates the built artifact, and the local test path runs `BeforeAll-ModuleLocal`, `Test-ModuleLocal`, and `AfterAll-ModuleLocal` across the OS matrix.
182
+
6.**Lint and reporting run alongside tests.**`Lint-SourceCode` analyzes `src/`, `Get-TestResults` aggregates all test output, and `Get-CodeCoverage` calculates coverage from the module test stages.
183
+
7.**Docs build from the same change set.**`Build-Docs` generates command and doc content, `Build-Site` prepares the static site, and `Publish-Site` deploys it for merged PRs.
184
+
8.**Publish only happens after a releasable merge.**`Publish-Module` runs for merged PRs, or for preview builds when the PR carries `Prerelease`, and reads the already-stamped manifest version rather than recalculating it.
185
+
186
+
Stage reference:
187
+
143
188
| Stage | Runs on | Purpose |
144
189
| ----- | ------- | ------- |
145
190
|**Plan**| All events | Loads `.github/PSModule.yml`, resolves version from PR labels, produces the Settings JSON |
@@ -157,16 +202,14 @@ graph LR
157
202
|**Build-Docs / Build-Site**| Open/Updated PR, Merged PR, Manual | Generates documentation site from source |
158
203
|**Publish-Site**| Merged PR | Deploys documentation site to GitHub Pages |
159
204
160
-
### Important file patterns
161
-
162
-
The workflow only triggers build, test, and publish stages when changed files match the `ImportantFilePatterns` setting. The default patterns are:
205
+
Default important file patterns:
163
206
164
207
```text
165
208
^src/
166
209
^README\.md$
167
210
```
168
211
169
-
Changes that do not match any pattern result in `ReleaseType: None` — the pipeline skips build, test, and publish entirely. Override in `.github/PSModule.yml`:
212
+
Override them in `.github/PSModule.yml` when other files should trigger the full module lifecycle:
0 commit comments