-
-
Notifications
You must be signed in to change notification settings - Fork 1
fix(releae): fix deploy workflow #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… test result validation
…ccurate data retrieval
| @@ -0,0 +1,27 @@ | |||
| Write-Information -Message ("Loading {0} ..." -f ($PSCommandPath | Split-Path -LeafBase)) -InformationAction continue | |||
Check warning
Code scanning / PSScriptAnalyzer
Cmdlet 'Write-Information' may be used incorrectly. Please check that all mandatory parameters are supplied. Warning
| VariablesToExport = '*' | ||
|
|
||
| # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. | ||
| AliasesToExport = '*' |
Check warning
Code scanning / PSScriptAnalyzer
Do not use wildcard or $null in this field. Explicitly specify a list for AliasesToExport. Warning
| FunctionsToExport = '*' | ||
|
|
||
| # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. | ||
| CmdletsToExport = '*' |
Check warning
Code scanning / PSScriptAnalyzer
Do not use wildcard or $null in this field. Explicitly specify a list for CmdletsToExport. Warning
| @@ -0,0 +1,37 @@ | |||
| function Set-TestName{ | |||
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Set-TestName' does not have a help comment. Note test
| } | ||
| } Export-ModuleMember -Function Set-TestName -Alias st | ||
|
|
||
| function Get-TestName{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Get-TestName' does not have a help comment. Note test
| } | ||
| } Export-ModuleMember -Function Get-TestName -Alias gt | ||
|
|
||
| function Clear-TestName{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Clear-TestName' does not have a help comment. Note test
| $manifest = $Path | Join-Path -child "*.psd1" | Get-Item | Import-PowerShellDataFile | ||
| $requiredModule = $null -eq $manifest.RequiredModules ? @() : $manifest.RequiredModules | ||
|
|
||
| "Found RequiredModules: $($requiredModule.Count)" | Write-Host -ForegroundColor DarkGray |
Check warning
Code scanning / PSScriptAnalyzer
File 'Get-RequiredModule.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
|
|
||
| # Convert to hashtable | ||
| $requiredModule | ForEach-Object{ | ||
| "Processing RequiredModule: $($_| convertto-json -Depth 5)" | Write-Host -ForegroundColor DarkGray |
Check warning
Code scanning / PSScriptAnalyzer
File 'Get-RequiredModule.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| . SYNOPSIS | ||
| Extracts the required modules from the module manifest | ||
| #> | ||
| function Get-RequiredModule{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Get-RequiredModule' does not have a help comment. Note
| ) | ||
|
|
||
| process{ | ||
| # Powershell module manifest does not allow versions with prerelease tags on them. |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| @@ -0,0 +1,28 @@ | |||
| function Test-Result{ | |||
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Test-Result' does not have a help comment. Note test
| process{ | ||
| # Chek results from last run | ||
| $Result = $Result ?? $Global:ResultTestingHelper | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note test
| if($SkippedNotAllowed -and $Result.Skipped -gt 0){ | ||
| return $false | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note test
| if($NotImplementedNotAllowed -and $Result.NotImplemented -gt 0){ | ||
| return $false | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note test
|
|
||
| # Allow Not Implemented and Skipped tests to pass | ||
| $passed = $Result.Tests -eq $Result.Pass + $Result.NotImplemented + $Result.Skipped | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note test
deploy workflow is failing after release creation