Exit-1 if invoke-pester created error entries

This commit is contained in:
Matthias 2024-06-02 13:42:51 +02:00
parent c324981a17
commit e9fb645b98

View File

@ -320,12 +320,14 @@ jobs:
- name: Run Pester tests (PowerShell)
run: |
Write-host $PSVersionTable.PSVersion.Major $PSVersionTable.PSRemotingProtocolVersion.Minor
$PSVersionTable
Set-PSRepository psgallery -InstallationPolicy trusted
Install-Module -Name Pester -RequiredVersion 5.3.1 -Confirm:$false -Force
$Error.clear()
Invoke-Pester -Path "tests" -CI
shell: pwsh
if ($Error.Length -gt 0) {exit 1}
shell: powershell
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1