Skip to content

Commit d0501f9

Browse files
🧪 [Test]: Assert isolated framework artifacts
1 parent 3505ca4 commit d0501f9

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,26 @@ jobs:
8080
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
8181
with:
8282
name: docs
83-
path: tests/srcTestRepo/outputs/docs
83+
path: tests/srcTestRepo/.PSModule/docs
8484

85-
- name: Verify root Functions index is published
85+
- name: Verify framework artifacts are isolated
8686
shell: pwsh
8787
run: |
88-
$path = 'tests/srcTestRepo/outputs/docs/index.md'
88+
$path = 'tests/srcTestRepo/.PSModule/docs/index.md'
8989
if (-not (Test-Path -Path $path)) {
9090
throw 'Expected root Functions index at ' +
91-
'tests/srcTestRepo/outputs/docs/index.md.'
91+
'tests/srcTestRepo/.PSModule/docs/index.md.'
92+
}
93+
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+
}
92103
}
93104
94105
$content = Get-Content -Path $path -Raw

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,26 @@ jobs:
8080
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
8181
with:
8282
name: docs
83-
path: tests/srcWithManifestTestRepo/outputs/docs
83+
path: tests/srcWithManifestTestRepo/.PSModule/docs
8484

85-
- name: Verify root Functions index is published
85+
- name: Verify framework artifacts are isolated
8686
shell: pwsh
8787
run: |
88-
$path = 'tests/srcWithManifestTestRepo/outputs/docs/index.md'
88+
$path = 'tests/srcWithManifestTestRepo/.PSModule/docs/index.md'
8989
if (-not (Test-Path -Path $path)) {
9090
throw 'Expected root Functions index at ' +
91-
'tests/srcWithManifestTestRepo/outputs/docs/index.md.'
91+
'tests/srcWithManifestTestRepo/.PSModule/docs/index.md.'
92+
}
93+
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+
}
92103
}
93104
94105
$content = Get-Content -Path $path -Raw

0 commit comments

Comments
 (0)