Skip to content

Commit 192ca04

Browse files
Verify analyzer report artifact isolation
1 parent 77117a7 commit 192ca04

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/Lint-SourceCode.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,24 @@ jobs:
3737
TestResult_Enabled: true
3838
TestResult_OutputPath: ${{ fromJson(inputs.Settings).WorkingDirectory }}/.PSModule/TestResult/PSModuleLint-SourceCode-${{ runner.os }}-TestResult-Report.xml
3939
TestResult_TestSuiteName: PSModuleLint-SourceCode-${{ runner.os }}
40+
41+
- name: Verify analyzer report location
42+
shell: pwsh
43+
working-directory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
44+
run: |
45+
$reportPath = '.PSModule/TestResult/PSModuleLint-SourceCode-${{ runner.os }}-TestResult-Report.xml'
46+
if (-not (Test-Path -Path $reportPath)) {
47+
throw "Expected analyzer report was not created at $reportPath."
48+
}
49+
50+
$legacyArtifactPaths = @(
51+
'TestResult'
52+
'CodeCoverage'
53+
'.temp'
54+
)
55+
56+
foreach ($path in $legacyArtifactPaths) {
57+
if (Test-Path -Path $path) {
58+
throw "Legacy root artifact path was created: $path"
59+
}
60+
}

.github/workflows/Test-Module.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,24 @@ jobs:
8181
TestResult_Enabled: true
8282
TestResult_OutputPath: ${{ fromJson(inputs.Settings).WorkingDirectory }}/.PSModule/TestResult/PSModuleLint-Module-${{ runner.os }}-TestResult-Report.xml
8383
TestResult_TestSuiteName: PSModuleLint-Module-${{ runner.os }}
84+
85+
- name: Verify analyzer report location
86+
shell: pwsh
87+
working-directory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
88+
run: |
89+
$reportPath = '.PSModule/TestResult/PSModuleLint-Module-${{ runner.os }}-TestResult-Report.xml'
90+
if (-not (Test-Path -Path $reportPath)) {
91+
throw "Expected analyzer report was not created at $reportPath."
92+
}
93+
94+
$legacyArtifactPaths = @(
95+
'TestResult'
96+
'CodeCoverage'
97+
'.temp'
98+
)
99+
100+
foreach ($path in $legacyArtifactPaths) {
101+
if (Test-Path -Path $path) {
102+
throw "Legacy root artifact path was created: $path"
103+
}
104+
}

0 commit comments

Comments
 (0)