Skip to content

Commit 7d0ca8c

Browse files
🧪 [Test]: Assert isolated Pester artifacts
1 parent fc5bc6f commit 7d0ca8c

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/Test-ModuleLocal.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,31 @@ jobs:
8989
Prescript: | # This is to speed up module loading in Pester.
9090
Install-PSResource -Repository PSGallery -TrustRepository -Name PSCustomObject
9191
Import-Module -Name '${{ steps.import-module.outputs.name }}' -RequiredVersion '${{ fromJson(inputs.Settings).Publish.Module.Resolution.Version }}'
92+
93+
- name: Verify Pester framework artifact paths
94+
shell: pwsh
95+
working-directory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
96+
run: |
97+
$artifactPaths = @(
98+
'.PSModule/.temp'
99+
'.PSModule/TestResult'
100+
'.PSModule/CodeCoverage'
101+
)
102+
103+
foreach ($artifactPath in $artifactPaths) {
104+
if (-not (Test-Path -Path $artifactPath -PathType Container)) {
105+
throw "Expected Pester artifact directory at [$artifactPath]."
106+
}
107+
}
108+
109+
$legacyPaths = @(
110+
'.temp'
111+
'TestResult'
112+
'CodeCoverage'
113+
)
114+
115+
foreach ($legacyPath in $legacyPaths) {
116+
if (Test-Path -Path $legacyPath) {
117+
throw "Legacy Pester artifact directory exists: [$legacyPath]."
118+
}
119+
}

0 commit comments

Comments
 (0)