Gate postgres install to the sharded test_postgres_backend job

Re-apply the postgres-server install step in dev's new per-file sharded
test-parallel structure, conditioned on the shard whose matrix.test.path is
the postgres backend test so other shards skip the apt install.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YHSjZM6TstSAMN2PhgfUg
This commit is contained in:
Claude 2026-07-24 10:33:43 +00:00
parent e6102b52ac
commit 2df28d9a72
No known key found for this signature in database

View File

@ -120,6 +120,14 @@ jobs:
fi
uv sync --locked --dev "${extra_args[@]}"
- name: Install PostgreSQL server binaries
if: contains(matrix.test.path, 'test_postgres_backend')
run: |
set -Eeuo pipefail
if ! ls /usr/lib/postgresql/*/bin/initdb >/dev/null 2>&1 && ! command -v initdb >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y postgresql
fi
- name: Run ${{ matrix.test.name }}
env:
TEST_PATH: ${{ matrix.test.path }}