Skip to content

Commit 3c82398

Browse files
Add manifest verification step to all Action-Test jobs
1 parent 06a216a commit 3c82398

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/Action-Test.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ jobs:
3535
ArtifactName: PSModuleTestDefault
3636
WorkingDirectory: tests/srcTestRepo
3737

38-
ActionTestMinimal:
38+
- name: Verify manifest
39+
shell: pwsh
40+
run: |
41+
$manifest = Import-PowerShellDataFile 'tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1'
42+
if ($manifest.ModuleVersion -ne '1.0.0') {
43+
throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'"
44+
}
45+
Write-Host "ModuleVersion: $($manifest.ModuleVersion)"
3946
name: Action-Test - [Minimal]
4047
runs-on: ubuntu-latest
4148
steps:
@@ -52,6 +59,15 @@ jobs:
5259
ArtifactName: PSModuleTestMinimal
5360
WorkingDirectory: tests/srcMinimalTestRepo
5461

62+
- name: Verify manifest
63+
shell: pwsh
64+
run: |
65+
$manifest = Import-PowerShellDataFile 'tests/srcMinimalTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1'
66+
if ($manifest.ModuleVersion -ne '1.0.0') {
67+
throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'"
68+
}
69+
Write-Host "ModuleVersion: $($manifest.ModuleVersion)"
70+
5571
ActionTestWithManifest:
5672
name: Action-Test - [DefaultWithManifest]
5773
runs-on: ubuntu-24.04
@@ -68,3 +84,12 @@ jobs:
6884
Version: 1.0.0
6985
ArtifactName: PSModuleTestWithManifest
7086
WorkingDirectory: tests/srcWithManifestTestRepo
87+
88+
- name: Verify manifest
89+
shell: pwsh
90+
run: |
91+
$manifest = Import-PowerShellDataFile 'tests/srcWithManifestTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1'
92+
if ($manifest.ModuleVersion -ne '1.0.0') {
93+
throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'"
94+
}
95+
Write-Host "ModuleVersion: $($manifest.ModuleVersion)"

0 commit comments

Comments
 (0)