@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / add9342
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 09:15 UTC

ci(wp1): load disposable local DB URL inside lifecycle SQL step and deny remote targets

davoodmehraban89 committed Nov 23, 2026 at 22:49 UTC add9342596800727965d1514f92028b0dfa7b7d9
1 file changed +13 -1
.github/workflows/wp1-ledger.yml
+13 -1
@@ -98,7 +98,19 @@ jobs:
98 exists(select 1 from pg_proc p join pg_namespace n on n.oid=p.pronamespace where n.nspname='public' and p.proname='finora_journal_refresh_source_draft');
99 " | grep -Fx 't|t|t|t|t|t'
100 - name: Prove universal temporary journal lifecycle, immutable ATF and draft deletion tombstones
101 - run: psql "$DB_URL" -v ON_ERROR_STOP=1 -f supabase/tests/wp4_journal_document_lifecycle.sql
101 + run: |
102 + set -euo pipefail
103 + # GitHub Actions steps do not retain prior shell exports; resolve this
104 + # disposable stack's URL in the SAME step that invokes psql.
105 + supabase status -o env > /tmp/supabase-wp1-lifecycle.env
106 + set -a
107 + . /tmp/supabase-wp1-lifecycle.env
108 + set +a
109 + case "$DB_URL" in
110 + *@127.0.0.1:54322/*|*@localhost:54322/*) ;;
111 + *) echo "FINORA_WP1_NONLOCAL_DB_URL_BLOCK: refusing lifecycle SQL" >&2; exit 1 ;;
112 + esac
113 + psql "$DB_URL" -X -v ON_ERROR_STOP=1 -f supabase/tests/wp4_journal_document_lifecycle.sql
114 - name: Run manual journal adapter contract tests
115 run: node --test scripts/journal-rpc-adapter.test.mjs
116 - name: Collect diagnostics if local stack fails