@@ -107,8 +107,8 @@ jobs:
107
107
shell : pwsh
108
108
run : Invoke-ScriptAnalyzer -Path . -Recurse -EnableExit
109
109
110
- - name : Run Pester tests on Windows PowerShell to ensure backward compatibility
111
- shell : powershell
110
+ - name : Run Pester tests and generate code coverage report
111
+ shell : pwsh
112
112
run : |
113
113
Write-Output "Pester version being used:"
114
114
Import-Module -Name Pester
@@ -120,14 +120,18 @@ jobs:
120
120
Run = @{ Throw = $true }
121
121
TestResult = @{
122
122
Enabled = $true
123
- OutputPath = 'test-results-windows-powershell-nunit.xml'
123
+ OutputPath = 'test-results-pwsh-nunit.xml'
124
+ }
125
+ CodeCoverage = @{
126
+ Enabled = $true
127
+ OutputPath = 'code-coverage-jacoco.xml'
128
+ Path = 'src/' # Only include code coverage for the module's source code, not build or deployment scripts.
124
129
}
125
- CodeCoverage = @{ Enabled = $false }
126
130
}
127
131
Invoke-Pester -Configuration $pesterConfig
128
132
129
- - name : Run Pester tests and generate code coverage report
130
- shell : pwsh
133
+ - name : Run Pester tests on Windows PowerShell to ensure backward compatibility
134
+ shell : powershell
131
135
run : |
132
136
Write-Output "Pester version being used:"
133
137
Import-Module -Name Pester
@@ -139,13 +143,9 @@ jobs:
139
143
Run = @{ Throw = $true }
140
144
TestResult = @{
141
145
Enabled = $true
142
- OutputPath = 'test-results-pwsh-nunit.xml'
143
- }
144
- CodeCoverage = @{
145
- Enabled = $true
146
- OutputPath = 'code-coverage-jacoco.xml'
147
- Path = 'src/' # Only include code coverage for the module's source code, not build or deployment scripts.
146
+ OutputPath = 'test-results-windows-powershell-nunit.xml'
148
147
}
148
+ CodeCoverage = @{ Enabled = $false }
149
149
}
150
150
Invoke-Pester -Configuration $pesterConfig
151
151
0 commit comments