ci: fix audit_logs verification to query pg_tables directly
CI / Architecture Guardrails (push) Successful in 2m51s
CI / Release Images (push) Has been cancelled
CI / Lint (push) Successful in 4m54s
CI / Typecheck (push) Successful in 5m46s
CI / Unit Tests (push) Failing after 7m42s
CI / Build (push) Successful in 9m25s
CI / Fresh-Linux Docker Deploy (push) Failing after 4m2s
CI / E2E Tests (push) Failing after 10m49s
CI / Assistant Split Regression (push) Successful in 6m25s
CI / Architecture Guardrails (push) Successful in 2m51s
CI / Release Images (push) Has been cancelled
CI / Lint (push) Successful in 4m54s
CI / Typecheck (push) Successful in 5m46s
CI / Unit Tests (push) Failing after 7m42s
CI / Build (push) Successful in 9m25s
CI / Fresh-Linux Docker Deploy (push) Failing after 4m2s
CI / E2E Tests (push) Failing after 10m49s
CI / Assistant Split Regression (push) Successful in 6m25s
psql's \\dt meta-command interpreted 'public.*' as a literal pattern on the runner's psql build, returning 'Did not find any relation named public.*' even though prisma db push had succeeded. Replace with a direct query against pg_tables so the verification reflects actual schema state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -387,9 +387,12 @@ jobs:
|
||||
echo "--- prisma db push ---"
|
||||
pnpm --filter @capakraken/db exec prisma db push --schema ./prisma/schema.prisma --accept-data-loss --skip-generate
|
||||
echo "--- tables in public after push ---"
|
||||
psql -h e2epg -U capakraken -d capakraken_test -v ON_ERROR_STOP=1 \
|
||||
-c "\dt public.*" | tee /tmp/tables.txt
|
||||
if ! grep -q 'audit_logs' /tmp/tables.txt; then
|
||||
# `\dt public.*` was interpreted literally by this psql build (returned
|
||||
# "Did not find any relation named public.*"). Query pg_tables directly.
|
||||
psql -h e2epg -U capakraken -d capakraken_test -v ON_ERROR_STOP=1 -At \
|
||||
-c "SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename" \
|
||||
| tee /tmp/tables.txt
|
||||
if ! grep -qx 'audit_logs' /tmp/tables.txt; then
|
||||
echo "ERROR: audit_logs table missing after push!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user