Skip to content

Commit b5a7ea3

Browse files
Fix workflow to properly test module structure
Co-authored-by: johnmbaughman <1634414+johnmbaughman@users.noreply.github.com>
1 parent 920f58b commit b5a7ea3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/powershell-ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ jobs:
3030
run: |
3131
pwsh -NoProfile -Command "Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass; ./scripts/check-absolute-paths.ps1 -Path ."
3232
33-
- name: Run PSScriptAnalyzer
33+
- name: Run PSScriptAnalyzer on module
3434
run: |
35-
pwsh -NoProfile -Command "Invoke-ScriptAnalyzer -Path . -Recurse -Settings .psscriptanalyzer.psd1"
35+
pwsh -NoProfile -Command "Invoke-ScriptAnalyzer -Path ./PSSpecKit -Recurse -Settings .psscriptanalyzer.psd1"
36+
37+
- name: Verify module can be imported
38+
run: |
39+
pwsh -NoProfile -Command "Import-Module ./PSSpecKit/PSSpecKit.psd1 -Force; Write-Host 'Module imported successfully'; Get-Command -Module PSSpecKit | Format-Table -AutoSize"
3640
3741
- name: Run Pester tests
3842
run: |
3943
pwsh -NoProfile -Command 'Import-Module Pester -MinimumVersion 5.0.0 -Force; $r = Pester\Invoke-Pester -Path .\tests -PassThru; if ($r.FailedCount -gt 0) { exit 1 }'
40-
# pwsh -NoProfile -Command "Import-Module Pester -RequiredVersion 5.0.0 -Force; $r = Pester\Invoke-Pester -Path .\tests -PassThru; if ($r.FailedCount -gt 0) { exit 1 }"
4144
4245
integration-tests:
4346
runs-on: windows-latest

0 commit comments

Comments
 (0)