@@ -121,6 +121,70 @@ jobs:
121121 Write-Host "Outcome: ${{ steps.action-test.outcome }}"
122122 Write-Host "Conclusion: ${{ steps.action-test.conclusion }}"
123123
124+ ActionTestReportPaths :
125+ name : Action-Test - [Report Paths]
126+ runs-on : ubuntu-latest
127+ steps :
128+ - name : Checkout repo
129+ uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
130+ with :
131+ persist-credentials : false
132+
133+ - name : Action-Test
134+ uses : ./
135+ id : action-test
136+ with :
137+ Path : src
138+ WorkingDirectory : tests/srcTestRepo
139+ TestResult_Enabled : true
140+ TestResult_OutputFormat : NUnitXml
141+ TestResult_OutputPath : artifacts/TestResult/results.xml
142+ CodeCoverage_Enabled : true
143+ CodeCoverage_OutputFormat : JaCoCo
144+ CodeCoverage_OutputPath : artifacts/CodeCoverage/coverage.xml
145+ CodeCoverage_Path : ../../src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1
146+
147+ - name : Assert report paths
148+ shell : pwsh
149+ run : |
150+ tests/Assert-ReportPaths.ps1 `
151+ -WorkingDirectory tests/srcTestRepo `
152+ -TestResultPath artifacts/TestResult/results.xml `
153+ -CodeCoveragePath artifacts/CodeCoverage/coverage.xml `
154+ -ArtifactDirectory artifacts `
155+ -UnexpectedDirectory TestResult,CodeCoverage,.temp
156+
157+ ActionTestInvokePesterDefaultReportPaths :
158+ name : Action-Test - [Invoke-Pester Default Report Paths]
159+ runs-on : ubuntu-latest
160+ steps :
161+ - name : Checkout repo
162+ uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
163+ with :
164+ persist-credentials : false
165+
166+ - name : Action-Test
167+ uses : ./
168+ id : action-test
169+ with :
170+ Path : src
171+ WorkingDirectory : tests/srcTestRepo
172+ TestResult_Enabled : true
173+ TestResult_OutputFormat : NUnitXml
174+ CodeCoverage_Enabled : true
175+ CodeCoverage_OutputFormat : JaCoCo
176+ CodeCoverage_Path : ../../src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1
177+
178+ - name : Assert report paths
179+ shell : pwsh
180+ run : |
181+ tests/Assert-ReportPaths.ps1 `
182+ -WorkingDirectory tests/srcTestRepo `
183+ -TestResultPath TestResult/PSScriptAnalyzer-TestResult-Report.xml `
184+ -CodeCoveragePath CodeCoverage/PSScriptAnalyzer-CodeCoverage-Report.xml `
185+ -ArtifactDirectory . `
186+ -UnexpectedDirectory .temp
187+
124188 ActionTestOutputs :
125189 name : Action-Test - [outputs]
126190 runs-on : ubuntu-latest
@@ -153,6 +217,8 @@ jobs:
153217 - ActionTestSrcCustom
154218 - ActionTestSrcWithManifest
155219 - ActionTestSrcWithManifestDefault
220+ - ActionTestReportPaths
221+ - ActionTestInvokePesterDefaultReportPaths
156222 - ActionTestOutputs
157223 if : always()
158224 runs-on : ubuntu-latest
@@ -165,6 +231,8 @@ jobs:
165231 WithManifestConclusion : ${{ needs.ActionTestSrcWithManifest.outputs.Conclusion }}
166232 WithManifestDefaultOutcome : ${{ needs.ActionTestSrcWithManifestDefault.outputs.Outcome }}
167233 WithManifestDefaultConclusion : ${{ needs.ActionTestSrcWithManifestDefault.outputs.Conclusion }}
234+ ReportPathsResult : ${{ needs.ActionTestReportPaths.result }}
235+ InvokePesterDefaultReportPathsResult : ${{ needs.ActionTestInvokePesterDefaultReportPaths.result }}
168236 OutputsOutcome : ${{ needs.ActionTestOutputs.outputs.Outcome }}
169237 OutputsConclusion : ${{ needs.ActionTestOutputs.outputs.Conclusion }}
170238 steps :
0 commit comments