Skip to content

Commit 4012bb0

Browse files
Merge branch 'main' into feature/configurable-important-file-patterns
2 parents dbe3a5b + 3ed96da commit 4012bb0

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.github/workflows/Build-Module.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
fetch-depth: 0
3131

3232
- name: Build module
33-
uses: PSModule/Build-PSModule@7a3ae1be38587e8051833d85ffa53c348de3cd0d # v4.0.13
33+
uses: PSModule/Build-PSModule@345728124d201f371a8b0f1aacb98f89000a06dc # v4.0.14
3434
with:
3535
Name: ${{ fromJson(inputs.Settings).Name }}
3636
ArtifactName: ${{ inputs.ArtifactName }}

.github/workflows/Lint-Repository.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ on:
99
required: true
1010

1111
permissions:
12-
contents: read # to checkout the repository
13-
statuses: write # to update the status of the workflow from linter
12+
contents: read # to checkout the repository
13+
statuses: write # to update the status of the workflow from linter
14+
pull-requests: write # to post super-linter summary comments on PRs
1415

1516
jobs:
1617
Lint-Repository:

.github/workflows/Test-Module.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module
6464

6565
- name: Test-Module
66-
uses: PSModule/Test-PSModule@d4d6d1d2ac1d243ca82c9c199371533e8d2220ef # v3.0.8
66+
uses: PSModule/Test-PSModule@8c3337136dc7cf320da39eeb50e776d04bc9ac73 # v3.0.10
6767
with:
6868
Name: ${{ fromJson(inputs.Settings).Name }}
6969
Debug: ${{ fromJson(inputs.Settings).Debug }}

.github/workflows/Test-SourceCode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fetch-depth: 0
2828

2929
- name: Test-SourceCode
30-
uses: PSModule/Test-PSModule@d4d6d1d2ac1d243ca82c9c199371533e8d2220ef # v3.0.8
30+
uses: PSModule/Test-PSModule@8c3337136dc7cf320da39eeb50e776d04bc9ac73 # v3.0.10
3131
with:
3232
Debug: ${{ fromJson(inputs.Settings).Debug }}
3333
Prerelease: ${{ fromJson(inputs.Settings).Prerelease }}

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ The [PSModule - SourceCode tests](./scripts/tests/SourceCode/PSModule/PSModule.T
163163
- [PSModule framework settings for style and standards for modules](https://github.com/PSModule/Test-PSModule?tab=readme-ov-file#module-tests)
164164
- [PSScriptAnalyzer rules](https://github.com/PSModule/Invoke-ScriptAnalyzer)
165165
- This produces a JSON-based report that is used by [Get-PesterTestResults](#get-test-results) evaluate the results of the tests.
166+
- **Code coverage for framework-generated code**: This step collects code coverage for framework-generated
167+
boilerplate. During the [build step](#build-module), [Build-PSModule](https://github.com/PSModule/Build-PSModule)
168+
injects boilerplate code into the compiled `.psm1` file — including type accelerator registration for public classes
169+
and enums, and the `OnRemove` cleanup hook. The framework tests in
170+
[Test-PSModule](https://github.com/PSModule/Test-PSModule) exercise these code paths and produce coverage artifacts
171+
that are aggregated with coverage from [Test-ModuleLocal](#test-module) in the
172+
[Get code coverage](#get-code-coverage) step. This keeps framework-generated lines from counting against the module
173+
author's coverage report.
166174

167175
### Test module
168176

@@ -299,6 +307,9 @@ The [PSModule - Module tests](./scripts/tests/Module/PSModule/PSModule.Tests.ps1
299307

300308
[workflow](./.github/workflows/Get-CodeCoverage.yml)
301309
- Gathers the code coverage from the previous steps and creates a summary of the results.
310+
- Aggregates coverage from the [Framework test](#framework-test) step (framework-generated boilerplate) and the
311+
[Test module](#test-module) step (module author code). A command executed in either step counts as covered, so
312+
framework-generated lines do not count against the module author's coverage target.
302313
- If the code coverage is below the target, the workflow will fail here.
303314

304315
### Publish module

0 commit comments

Comments
 (0)