File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments