Skip to content

Commit c2f7f58

Browse files
🧪 [Test]: Verify producer artifact paths
1 parent df9e956 commit c2f7f58

5 files changed

Lines changed: 41 additions & 22 deletions

File tree

.github/workflows/Build-Docs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ jobs:
4141
Name: ${{ fromJson(inputs.Settings).Name }}
4242
WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
4343

44+
- name: Verify framework artifact root
45+
if: ${{ github.repository == 'PSModule/Process-PSModule' }}
46+
shell: pwsh
47+
working-directory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
48+
run: |
49+
if (-not (Test-Path -Path '.PSModule/docs')) {
50+
throw 'Expected generated documentation at .PSModule/docs.'
51+
}
52+
53+
if (Test-Path -Path 'outputs') {
54+
throw 'Legacy framework artifact path exists: outputs'
55+
}
56+
4457
- name: Upload docs artifact
4558
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4659
with:

.github/workflows/Build-Module.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,16 @@ jobs:
6060
Prerelease: ${{ fromJson(inputs.Settings).Publish.Module.Resolution.Prerelease }}
6161
ArtifactName: ${{ inputs.ArtifactName }}
6262
WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
63+
64+
- name: Verify framework artifact root
65+
if: ${{ github.repository == 'PSModule/Process-PSModule' }}
66+
shell: pwsh
67+
working-directory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
68+
run: |
69+
if (-not (Test-Path -Path '.PSModule/module')) {
70+
throw 'Expected built module at .PSModule/module.'
71+
}
72+
73+
if (Test-Path -Path 'outputs') {
74+
throw 'Legacy framework artifact path exists: outputs'
75+
}

.github/workflows/Build-Site.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ jobs:
5858
SitePath: ${{ fromJson(inputs.Settings).WorkingDirectory }}/.PSModule/site/_site
5959
WorkflowPath: _wf
6060

61+
- name: Verify framework artifact root
62+
if: ${{ github.repository == 'PSModule/Process-PSModule' }}
63+
shell: pwsh
64+
working-directory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
65+
run: |
66+
if (-not (Test-Path -Path '.PSModule/site/_site')) {
67+
throw 'Expected generated site at .PSModule/site/_site.'
68+
}
69+
70+
foreach ($legacyPath in @('outputs', '_site')) {
71+
if (Test-Path -Path $legacyPath) {
72+
throw "Legacy framework artifact path exists: $legacyPath"
73+
}
74+
}
75+
6176
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
6277
with:
6378
name: github-pages

.github/workflows/Workflow-Test-Default.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,6 @@ jobs:
9191
'tests/srcTestRepo/.PSModule/docs/index.md.'
9292
}
9393
94-
$legacyPaths = @(
95-
'tests/srcTestRepo/outputs'
96-
'tests/srcTestRepo/_site'
97-
)
98-
99-
foreach ($legacyPath in $legacyPaths) {
100-
if (Test-Path -Path $legacyPath) {
101-
throw "Legacy framework artifact path exists: $legacyPath"
102-
}
103-
}
104-
10594
$content = Get-Content -Path $path -Raw
10695
$expectedSnippets = @(
10796
'# Functions'

.github/workflows/Workflow-Test-WithManifest.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,6 @@ jobs:
9191
'tests/srcWithManifestTestRepo/.PSModule/docs/index.md.'
9292
}
9393
94-
$legacyPaths = @(
95-
'tests/srcWithManifestTestRepo/outputs'
96-
'tests/srcWithManifestTestRepo/_site'
97-
)
98-
99-
foreach ($legacyPath in $legacyPaths) {
100-
if (Test-Path -Path $legacyPath) {
101-
throw "Legacy framework artifact path exists: $legacyPath"
102-
}
103-
}
104-
10594
$content = Get-Content -Path $path -Raw
10695
$expectedSnippets = @(
10796
'# Functions'

0 commit comments

Comments
 (0)