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