Skip to content

Commit 6e056e1

Browse files
feat: enhance workflow with settings validation and add PSModule test configuration
1 parent aeb8289 commit 6e056e1

File tree

4 files changed

+433
-3
lines changed

4 files changed

+433
-3
lines changed

.github/workflows/Action-Test.yml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,51 @@ jobs:
2828
persist-credentials: false
2929

3030
- name: Action-Test
31+
id: get-settings
3132
uses: ./
3233
with:
33-
Subject: PSModule
34+
SettingsPath: './tests/PSModule.yml'
35+
36+
- name: Validate Settings Output
37+
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+
}

.github/workflows/Linter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
uses: super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
2929
env:
3030
GITHUB_TOKEN: ${{ github.token }}
31+
VALIDATE_BIOME_FORMAT: false
32+
VALIDATE_BIOME_LINT: false
33+
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
34+
VALIDATE_JSCPD: false
3135
VALIDATE_JSON_PRETTIER: false
3236
VALIDATE_MARKDOWN_PRETTIER: false
3337
VALIDATE_YAML_PRETTIER: false

0 commit comments

Comments
 (0)