-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.ps1
More file actions
47 lines (45 loc) · 1.86 KB
/
Copy pathstatus.ps1
File metadata and controls
47 lines (45 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$PSStyle.OutputRendering = 'Ansi'
$outcome = $env:PSMODULE_INVOKE_PESTER_INTERNAL_Outcome
$conclusion = $env:PSMODULE_INVOKE_PESTER_INTERNAL_Conclusion
$executed = $env:PSMODULE_INVOKE_PESTER_INTERNAL_Executed -eq 'true'
$result = $env:PSMODULE_INVOKE_PESTER_INTERNAL_Result
$failedCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_FailedCount
$failedBlocksCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_FailedBlocksCount
$failedContainersCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_FailedContainersCount
$passedCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_PassedCount
$skippedCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_SkippedCount
$inconclusiveCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_InconclusiveCount
$notRunCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_NotRunCount
$totalCount = $env:PSMODULE_INVOKE_PESTER_INTERNAL_TotalCount
"Executed=$executed" >> $env:GITHUB_OUTPUT
LogGroup 'Outputs' {
[PSCustomObject]@{
Outcome = $outcome
Conclusion = $conclusion
Executed = $executed
Result = $result
FailedCount = $failedCount
FailedBlocksCount = $failedBlocksCount
FailedContainersCount = $failedContainersCount
PassedCount = $passedCount
SkippedCount = $skippedCount
InconclusiveCount = $inconclusiveCount
NotRunCount = $notRunCount
TotalCount = $totalCount
} | Format-List | Out-String
}
# If the tests did not execute, exit with a failure code
if ($executed -ne 'true') {
Write-Error 'Tests did not execute.'
exit 1
}
# If the outcome is not success, exit with a failure code
if ($outcome -ne 'success') {
Write-Error 'Tests did not pass.'
exit 1
}
# If the conclusion is not success
if ($conclusion -ne 'success') {
Write-Error 'Tests did not pass.'
exit 1
}