Commit d6bc94d
authored
π [Major]: Support parallel workflows and split in concerns (#98)
## Description
This PR introduces a major update to the `Test-PSModule` GitHub Action,
enabling flexible, parallelizable testing workflows β a key requirement
for `Process-PSModule` v4.
The action now supports isolated, configuration-driven test runs that
can be executed in parallel using GitHub matrix jobs. This enables
`Process-PSModule` to split testing across stages and environments
(e.g., OS matrix, linting vs runtime tests), significantly improving
modularity and execution time. Separate actions are created to collect
and evaluate results from tests run in matrices.
### Changes
- Replaces the previous `TestType` with `Settings` that defines which
test preset to execute:
- `SourceCode`: Lint source code using PSModule rules.
- `Module`: Validate module using PSModule rules.
- Move common PSModule functions to
[Install-PSModuleHelpers](https://github.com/PSModule/Install-PSModuleHelpers).
- Parallel Execution Support. Designed for matrix-based execution, e.g.:
- Run linter and style tests in parallel.
- Run Pester tests across Windows/macOS/Linux runners.
- Delegates analysis and testing to
-
[Invoke-ScriptAnalyzer](https://github.com/PSModule/Invoke-ScriptAnalyzer)
for static code analysis.
- [Invoke-Pester](https://github.com/PSModule/Invoke-Pester) for test
execution and coverage .
These bring better portability, customization, and feature alignment
with the broader PSModule ecosystem.
- JSON Artifacts for Downstream Evaluation
- Emits json structured outputs from Pesters test results and code
coverage, so that the data from a matrix job can be evaluated in a later
job using
[Get-PesterTestResults](https://github.com/PSModule/Get-PesterTestResults)
and
[Get-PesterCodeCoverage](https://github.com/PSModule/Get-PesterCodeCoverage)
- Clean Outputs for Chaining
- Exposes a bigger set of data as outputs for downstream steps to
consume.
- Custom Analyzer Rule Support
- Automatically picks up repo-level `PSScriptAnalyzerSettings.psd1` when
running `SourceCode`.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] π [Docs]
- [ ] πͺ² [Fix]
- [ ] π©Ή [Patch]
- [ ] 1 parent 1fd648f commit d6bc94d
File tree
104 files changed
+922
-768
lines changed- .github/workflows
- scripts
- helpers
- tests
- Module
- PSModule
- PSModule
- PSScriptAnalyzer
- SourceCode
- PSModule
- tests
- outputTestRepo
- outputs
- docs/PSModuleTest
- module/PSModuleTest
- assemblies
- data
- formats
- modules
- scripts
- types
- tests
- Environments
- MyTests
- srcTestRepo
- icon
- src
- assemblies
- classes
- private
- public
- data
- formats
- functions
- private
- public
- PSModule
- SomethingElse
- init
- modules
- scripts
- types
- variables
- private
- public
- tests
- srcWithManifestTestRepo
- icon
- src
- assemblies
- classes
- private
- public
- data
- formats
- functions
- private
- public
- PSModule
- SomethingElse
- init
- modules
- scripts
- types
- variables
- private
- public
- tests
- Environments
- MyTests
- tools
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
104 files changed
+922
-768
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
35 | | - | |
36 | | - | |
37 | 32 | | |
38 | 33 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
35 | | - | |
36 | | - | |
37 | 32 | | |
38 | 33 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
35 | | - | |
36 | | - | |
37 | 32 | | |
38 | 33 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
0 commit comments