Skip to content

Commit 414774c

Browse files
🔧 [Docs]: Enhance README with detailed settings table and examples for testing and build configurations
1 parent 1dbdc80 commit 414774c

File tree

1 file changed

+78
-62
lines changed

1 file changed

+78
-62
lines changed

‎README.md

Lines changed: 78 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -96,54 +96,85 @@ The file can be a JSON, YML or PSD1 file. By default it will look for `.github/P
9696
The following settings are available in the settings file:
9797
Here's a Markdown-formatted table describing your PowerShell object structure clearly and concisely:
9898

99-
| Name | Type | Description | Default |
100-
| ----------------------------------------- | --------------- | -------------------------------------------------------------- | ------------------------------ |
101-
| `Name` | `String` | Name identifier for the settings | `null` |
102-
| **Test** | `Object` | Settings related to testing | |
103-
| `Test.Skip` | `Boolean` | Skip all tests | `false` |
104-
| `Test.Linux.Skip` | `Boolean` | Skip tests on Linux | `false` |
105-
| `Test.MacOS.Skip` | `Boolean` | Skip tests on macOS | `false` |
106-
| `Test.Windows.Skip` | `Boolean` | Skip tests on Windows | `false` |
107-
| **Test.SourceCode** | `Object` | Settings for source code tests | |
108-
| `Test.SourceCode.Skip` | `Boolean` | Skip source code tests | `false` |
109-
| `Test.SourceCode.Linux.Skip` | `Boolean` | Skip source code tests on Linux | `false` |
110-
| `Test.SourceCode.MacOS.Skip` | `Boolean` | Skip source code tests on macOS | `false` |
111-
| `Test.SourceCode.Windows.Skip` | `Boolean` | Skip source code tests on Windows | `false` |
112-
| **Test.PSModule** | `Object` | Settings for PowerShell module tests | |
113-
| `Test.PSModule.Skip` | `Boolean` | Skip PowerShell module tests | `false` |
114-
| `Test.PSModule.Linux.Skip` | `Boolean` | Skip PS module tests on Linux | `false` |
115-
| `Test.PSModule.MacOS.Skip` | `Boolean` | Skip PS module tests on macOS | `false` |
116-
| `Test.PSModule.Windows.Skip` | `Boolean` | Skip PS module tests on Windows | `false` |
117-
| **Test.Module** | `Object` | Settings for generic module tests | |
118-
| `Test.Module.Skip` | `Boolean` | Skip generic module tests | `false` |
119-
| `Test.Module.Linux.Skip` | `Boolean` | Skip generic module tests on Linux | `false` |
120-
| `Test.Module.MacOS.Skip` | `Boolean` | Skip generic module tests on macOS | `false` |
121-
| `Test.Module.Windows.Skip` | `Boolean` | Skip generic module tests on Windows | `false` |
122-
| **Test.TestResults** | `Object` | Settings for test result publishing | |
123-
| `Test.TestResults.Skip` | `Boolean` | Skip test result processing | `false` |
124-
| **Test.CodeCoverage** | `Object` | Settings for code coverage | |
125-
| `Test.CodeCoverage.Skip` | `Boolean` | Skip code coverage tests | `false` |
126-
| `Test.CodeCoverage.PercentTarget` | `Integer` | Target code coverage percentage | `0` |
127-
| `Test.CodeCoverage.StepSummaryMode` | `String` | Step summary mode for code coverage reports | `'Missed, Files'` |
128-
| **Build** | `Object` | Settings for build processes | |
129-
| `Build.Skip` | `Boolean` | Skip all build tasks | `false` |
130-
| `Build.Module.Skip` | `Boolean` | Skip module build | `false` |
131-
| `Build.Docs.Skip` | `Boolean` | Skip documentation build | `false` |
132-
| `Build.Site.Skip` | `Boolean` | Skip website build | `false` |
133-
| **Publish.Module** | `Object` | Settings for module publishing | |
134-
| `Publish.Module.Skip` | `Boolean` | Skip module publishing | `false` |
135-
| `Publish.Module.AutoCleanup` | `Boolean` | Automatically cleanup old module versions | `true` |
136-
| `Publish.Module.AutoPatching` | `Boolean` | Automatically patch module version | `true` |
137-
| `Publish.Module.IncrementalPrerelease` | `Boolean` | Use incremental prerelease versioning | `true` |
138-
| `Publish.Module.DatePrereleaseFormat` | `String` | Format for date-based prerelease | `''` (empty string) |
139-
| `Publish.Module.VersionPrefix` | `String` | Prefix for version tags | `'v'` |
140-
| `Publish.Module.MajorLabels` | `String` | Labels indicating a major version bump | `'major, breaking'` |
141-
| `Publish.Module.MinorLabels` | `String` | Labels indicating a minor version bump | `'minor, feature'` |
142-
| `Publish.Module.PatchLabels` | `String` | Labels indicating a patch version bump | `'patch, fix'` |
143-
| `Publish.Module.IgnoreLabels` | `String` | Labels indicating no release | `'NoRelease'` |
144-
145-
This table clearly represents each nested property, type, brief description, and the default values you've specified in your provided PowerShell structure.
99+
| Name | Type | Description | Default |
100+
|----------------------------------------|-----------|---------------------------------------------|---------------------|
101+
| `Name` | `String` | Name identifier for the settings | `null` |
102+
| **Test** | `Object` | Settings related to testing | |
103+
| `Test.Skip` | `Boolean` | Skip all tests | `false` |
104+
| `Test.Linux.Skip` | `Boolean` | Skip tests on Linux | `false` |
105+
| `Test.MacOS.Skip` | `Boolean` | Skip tests on macOS | `false` |
106+
| `Test.Windows.Skip` | `Boolean` | Skip tests on Windows | `false` |
107+
| **Test.SourceCode** | `Object` | Settings for source code tests | |
108+
| `Test.SourceCode.Skip` | `Boolean` | Skip source code tests | `false` |
109+
| `Test.SourceCode.Linux.Skip` | `Boolean` | Skip source code tests on Linux | `false` |
110+
| `Test.SourceCode.MacOS.Skip` | `Boolean` | Skip source code tests on macOS | `false` |
111+
| `Test.SourceCode.Windows.Skip` | `Boolean` | Skip source code tests on Windows | `false` |
112+
| **Test.PSModule** | `Object` | Settings for PSModule framework tests | |
113+
| `Test.PSModule.Skip` | `Boolean` | Skip PSModule framework tests | `false` |
114+
| `Test.PSModule.Linux.Skip` | `Boolean` | Skip PSModule framework tests on Linux | `false` |
115+
| `Test.PSModule.MacOS.Skip` | `Boolean` | Skip PSModule framework tests on macOS | `false` |
116+
| `Test.PSModule.Windows.Skip` | `Boolean` | Skip PSModule framework tests on Windows | `false` |
117+
| **Test.Module** | `Object` | Settings for module tests | |
118+
| `Test.Module.Skip` | `Boolean` | Skip module tests | `false` |
119+
| `Test.Module.Linux.Skip` | `Boolean` | Skip module tests on Linux | `false` |
120+
| `Test.Module.MacOS.Skip` | `Boolean` | Skip module tests on macOS | `false` |
121+
| `Test.Module.Windows.Skip` | `Boolean` | Skip module tests on Windows | `false` |
122+
| **Test.TestResults** | `Object` | Settings for test result publishing | |
123+
| `Test.TestResults.Skip` | `Boolean` | Skip test result processing | `false` |
124+
| **Test.CodeCoverage** | `Object` | Settings for code coverage | |
125+
| `Test.CodeCoverage.Skip` | `Boolean` | Skip code coverage tests | `false` |
126+
| `Test.CodeCoverage.PercentTarget` | `Integer` | Target code coverage percentage | `0` |
127+
| `Test.CodeCoverage.StepSummaryMode` | `String` | Step summary mode for code coverage reports | `'Missed, Files'` |
128+
| **Build** | `Object` | Settings for build processes | |
129+
| `Build.Skip` | `Boolean` | Skip all build tasks | `false` |
130+
| `Build.Module.Skip` | `Boolean` | Skip module build | `false` |
131+
| `Build.Docs.Skip` | `Boolean` | Skip documentation build | `false` |
132+
| `Build.Site.Skip` | `Boolean` | Skip website build | `false` |
133+
| **Publish.Module** | `Object` | Settings for module publishing | |
134+
| `Publish.Module.Skip` | `Boolean` | Skip module publishing | `false` |
135+
| `Publish.Module.AutoCleanup` | `Boolean` | Automatically cleanup old module versions | `true` |
136+
| `Publish.Module.AutoPatching` | `Boolean` | Automatically patch module version | `true` |
137+
| `Publish.Module.IncrementalPrerelease` | `Boolean` | Use incremental prerelease versioning | `true` |
138+
| `Publish.Module.DatePrereleaseFormat` | `String` | Format for date-based prerelease | `''` |
139+
| `Publish.Module.VersionPrefix` | `String` | Prefix for version tags | `'v'` |
140+
| `Publish.Module.MajorLabels` | `String` | Labels indicating a major version bump | `'major, breaking'` |
141+
| `Publish.Module.MinorLabels` | `String` | Labels indicating a minor version bump | `'minor, feature'` |
142+
| `Publish.Module.PatchLabels` | `String` | Labels indicating a patch version bump | `'patch, fix'` |
143+
| `Publish.Module.IgnoreLabels` | `String` | Labels indicating no release | `'NoRelease'` |
144+
145+
### Example 1 - Rapid testing
146+
147+
This example runs all steps and will require that code coverage is 80% before passing.
146148

149+
```yaml
150+
Test:
151+
CodeCoverage:
152+
PercentTarget: 80
153+
```
154+
155+
### Example 2 - Rapid testing
156+
157+
This example ends up running Get-Settings, Build-Module and Test-Module (tests from the module repo) on ubuntu-latest.
158+
159+
```yaml
160+
Test:
161+
SourceCode:
162+
Skip: true
163+
PSModule:
164+
Skip: true
165+
Module:
166+
MacOS:
167+
Skip: true
168+
Windows:
169+
Skip: true
170+
TestResults:
171+
Skip: true
172+
CodeCoverage:
173+
Skip: true
174+
Build:
175+
Docs:
176+
Skip: true
177+
```
147178
148179
## Usage
149180
@@ -153,11 +184,6 @@ This table clearly represents each nested property, type, brief description, and
153184
| ---- | ---- | ----------- | -------- | ------- |
154185
| `Name` | `string` | The name of the module to process. This defaults to the repository name if nothing is specified. | `false` | N/A |
155186
| `Path` | `string` | The path to the source code of the module. | `false` | `src` |
156-
| `ModulesOutputPath` | `string` | The path to the output directory for the modules. | `false` | `outputs/modules` |
157-
| `DocsOutputPath` | `string` | The path to the output directory for the documentation. | `false` | `outputs/docs` |
158-
| `PublishDocs` | `boolean` | Whether to publish the documentation using MkDocs and GitHub Pages. | `false` | `true` |
159-
| `SiteOutputPath` | `string` | The path to the output directory for the site. | `false` | `outputs/site` |
160-
| `Skip` | `string` | Defines what types of tests to skip. Allowed values are 'All', 'SourceCode', 'Module', 'None', 'macOS', 'Windows', 'Linux'. | `false` | `None` |
161187
| `Version` | `string` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | N/A |
162188
| `Prerelease` | `boolean` | Whether to use a prerelease version of the 'GitHub' module. | `false` | `false` |
163189
| `Debug` | `boolean` | Whether to enable debug output. Adds a `debug` step to every job. | `false` | `false` |
@@ -204,13 +230,3 @@ permissions:
204230
```
205231

206232
For more info see [Deploy GitHub Pages site](https://github.com/marketplace/actions/deploy-github-pages-site).
207-
208-
## Compatibility
209-
210-
The action is compatible with the following configurations:
211-
212-
| OS | Shell |
213-
| --- | --- |
214-
| windows-latest | pwsh |
215-
| macos-latest | pwsh |
216-
| ubuntu-latest | pwsh |

0 commit comments

Comments
 (0)