Skip to content

Commit 9d59f8a

Browse files
feat: add settings validation script and JSON schema for PSModule configuration
1 parent 5094e04 commit 9d59f8a

File tree

4 files changed

+485
-41
lines changed

4 files changed

+485
-41
lines changed

.github/workflows/Action-Test.yml

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -35,44 +35,6 @@ jobs:
3535

3636
- name: Validate Settings Output
3737
shell: pwsh
38-
run: |
39-
$settings = '${{ steps.get-settings.outputs.Settings }}' | ConvertFrom-Json
40-
if (-not $settings) {
41-
Write-Error "Settings output is empty"
42-
exit 1
43-
}
44-
Write-Host "✓ Settings retrieved successfully"
45-
Write-Host "Settings: $($settings | ConvertTo-Json -Depth 2)"
46-
47-
- name: Validate SourceCodeTestSuites Output
48-
shell: pwsh
49-
run: |
50-
$suites = '${{ steps.get-settings.outputs.SourceCodeTestSuites }}'
51-
if ([string]::IsNullOrEmpty($suites)) {
52-
Write-Host "⚠ SourceCodeTestSuites is empty (this may be expected)"
53-
} else {
54-
$suitesObj = $suites | ConvertFrom-Json
55-
Write-Host "✓ SourceCodeTestSuites: $($suitesObj.Count) suite(s) found"
56-
}
57-
58-
- name: Validate PSModuleTestSuites Output
59-
shell: pwsh
60-
run: |
61-
$suites = '${{ steps.get-settings.outputs.PSModuleTestSuites }}'
62-
if ([string]::IsNullOrEmpty($suites)) {
63-
Write-Host "⚠ PSModuleTestSuites is empty (this may be expected)"
64-
} else {
65-
$suitesObj = $suites | ConvertFrom-Json
66-
Write-Host "✓ PSModuleTestSuites: $($suitesObj.Count) suite(s) found"
67-
}
68-
69-
- name: Validate ModuleTestSuites Output
70-
shell: pwsh
71-
run: |
72-
$suites = '${{ steps.get-settings.outputs.ModuleTestSuites }}'
73-
if ([string]::IsNullOrEmpty($suites)) {
74-
Write-Host "⚠ ModuleTestSuites is empty (this may be expected)"
75-
} else {
76-
$suitesObj = $suites | ConvertFrom-Json
77-
Write-Host "✓ ModuleTestSuites: $($suitesObj.Count) suite(s) found"
78-
}
38+
env:
39+
SETTINGS_JSON: ${{ steps.get-settings.outputs.Settings }}
40+
run: ./tests/Validate-Settings.ps1
File renamed without changes.

0 commit comments

Comments
 (0)