CI - Fail properly if psql failed to install (#4399)

# Description of Changes

We had an issue where the install failed but did not fail the step:
```
Run choco install psql -y --no-progress
Chocolatey v2.6.0
Installing the following packages:
psql
By installing, you accept licenses for the packages.
Failed to fetch results from V2 feed at 'https://community.chocolatey.org/api/v2/Packages(Id='psql',Version='16.2.0')' with following message : Response status code does not indicate success: 504 (Gateway Time-out).
Need to add specific handling for exception type NuGetResolverInputException
Unable to find package 'psql'. Existing packages must be restored before performing an install or update.
```

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None - this is just CI

# Expected complexity level and risk

None - this is just CI

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] Windows smoketests are able to use `psql` properly

---------

Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
This commit is contained in:
John Detter
2026-02-23 14:13:29 -06:00
committed by GitHub
parent 6298e0a4e0
commit 6836d26bae
+9 -2
View File
@@ -101,8 +101,15 @@ jobs:
- name: Install psql (Windows)
if: runner.os == 'Windows'
run: choco install psql -y --no-progress
shell: powershell
shell: pwsh
run: |
# Fail properly if any individual command fails
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
choco install psql -y --no-progress
# Check for existence, since `choco` doesn't seem to fail the step if it fails to install..
# See https://github.com/clockworklabs/SpacetimeDB/pull/4399 for more background.
Get-Command psql
- name: Update dotnet workloads
if: runner.os == 'Windows'