Skip to content

Commit 1dbdc80

Browse files
🔧 [Docs]: Update README for clarity and enhance workflow descriptions
1 parent b72045f commit 1dbdc80

File tree

2 files changed

+81
-13
lines changed

2 files changed

+81
-13
lines changed

README.md

Lines changed: 81 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,39 @@ Depending on the labels in the pull requests, the workflow will result in differ
2020

2121
![Process diagram](./media/Process-PSModule.png)
2222

23-
- [Get-Settings](./.github/workflows/Get-Settings.yml)
23+
- [Get settings](./.github/workflows/Get-Settings.yml)
2424
- Reads the settings file from a file in the module repository to configure the workflow.
2525
- Gathers tests and creates test configuration based on the settings and the tests available in the module repository.
2626
- This includes the selection of what OSes to run the tests on.
27-
- [Build-Module](./.github/workflows/Build-Module.yml)
27+
- [Build module](./.github/workflows/Build-Module.yml)
2828
- Compiles the module source code into a PowerShell module.
29-
- [Test-SourceCode](./.github/workflows/Test-SourceCode.yml)
30-
- Tests and lints the source code in parallel (matrix) using [PSModule framework settings for style and standards for source code](https://github.com/PSModule/Test-PSModule?tab=readme-ov-file#sourcecode-tests) + [PSScriptAnalyzer rules](https://github.com/PSModule/Invoke-ScriptAnalyzer).
29+
- [Test source code](./.github/workflows/Test-SourceCode.yml)
30+
- Tests the source code in parallel (matrix) using [PSModule framework settings for style and standards for source code](https://github.com/PSModule/Test-PSModule?tab=readme-ov-file#sourcecode-tests)
3131
- This produces a json based report that is used to later evaluate the results of the tests.
32-
- [Test-Module](./.github/workflows/Test-Module.yml)
32+
- [Lint source code](./.github/workflows/Lint-SourceCode.yml)
33+
- Lints the source code in parallel (matrix) using [PSScriptAnalyzer rules](https://github.com/PSModule/Invoke-ScriptAnalyzer).
34+
- This produces a json based report that is used to later evaluate the results of the linter.
35+
- [Framework test](./.github/workflows/Test-Module.yml)
3336
- Tests and lints the module in parallel (matrix) using [PSModule framework settings for style and standards foor modules](https://github.com/PSModule/Test-PSModule?tab=readme-ov-file#module-tests) + [PSScriptAnalyzer rules](https://github.com/PSModule/Invoke-ScriptAnalyzer).
3437
- This produces a json based report that is used to later evaluate the results of the tests.
35-
- [Test-ModuleLocal](./.github/workflows/Test-ModuleLocal.yml)
38+
- [Test module](./.github/workflows/Test-ModuleLocal.yml)
3639
- Import and tests the module in parallel (matrix) using Pester tests from the module repository.
3740
- This produces a json based report that is used to later evaluate the results of the tests.
38-
- [Build-Docs](./.github/workflows/Build-Docs.yml)
39-
- Generates documentation and lints the documentation using [SuperLinter](https://github.com/super-linter/super-linter).
40-
- [Build-Site](./.github/workflows/Build-Site.yml)
41-
- Generates a static site using [MkDocs](https://www.mkdocs.org/).
42-
- [Test-PSModule](https://github.com/PSModule/Test-PSModule/) - Tests the compiled module. This runs on 4 different environments to check compatibility.
43-
- PowerShell LTS on Windows, Ubuntu and macOS.
44-
- [Publish-PSModule](https://github.com/PSModule/Publish-PSModule/) - Publishes the module to the PowerShell Gallery, docs to GitHub Pages, and creates a release on the GitHub repository.
41+
- [Get test results](./.github/workflows/Get-TestResults.yml)
42+
- Gathers the test results from the previous steps and creates a summary of the results.
43+
- If any tests have failed, the workflow will fail here.
44+
- [Get code coverage](./.github/workflows/Get-CodeCoverage.yml)
45+
- Gathers the code coverage from the previous steps and creates a summary of the results.
46+
- If the code coverage is below the target, the workflow will fail here.
47+
- [Build docs](./.github/workflows/Build-Docs.yml)
48+
- Generates documentation and lints the documentation using [super-linter](https://github.com/super-linter/super-linter).
49+
- [Build site](./.github/workflows/Build-Site.yml)
50+
- Generates a static site using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/).
51+
- [Publish site](./.github/workflows/Publish-Site.yml)
52+
- Publishes the static site with the module documentationto GitHub Pages.
53+
- [Publish module](./.github/workflows/Publish-Module.yml)
54+
- Publishes the module to the PowerShell Gallery.
55+
- Creates a release on the GitHub repository.
4556

4657
To use the workflow, create a new file in the `.github/workflows` directory of the module repository and add the following content.
4758
<details>
@@ -77,6 +88,63 @@ jobs:
7788
```
7889
</details>
7990

91+
## Configuration
92+
93+
The workflow is configured using a settings file in the module repository.
94+
The file can be a JSON, YML or PSD1 file. By default it will look for `.github/PSModule.yml`.
95+
96+
The following settings are available in the settings file:
97+
Here's a Markdown-formatted table describing your PowerShell object structure clearly and concisely:
98+
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.
146+
147+
80148
## Usage
81149

82150
### Inputs

media/Process-PSModule.png

6.44 KB
Loading

0 commit comments

Comments
 (0)