From 0190f7d2cc9b15f85cedf2bd84e621631122a0e0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 27 Jul 2026 12:40:39 +0000 Subject: [PATCH] ci: align local validate.sh with full CI gate Mirror GitHub Actions by running the fixture smoke test, dbt build, and Terraform format/validate so local CONTRIBUTING checks match CI. Co-authored-by: Russell --- scripts/validate.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/validate.sh b/scripts/validate.sh index e127d5d..54aefef 100755 --- a/scripts/validate.sh +++ b/scripts/validate.sh @@ -1,8 +1,22 @@ #!/usr/bin/env bash set -euo pipefail +# Keep this gate aligned with .github/workflows/ci.yml. uv run ruff check src tests uv run ruff format --check src tests uv run mypy src uv run pytest -uv run dbt parse --project-dir dbt --profiles-dir dbt + +cp config/ledger.example.yml config/ledger.yml +uv run python -m ledger.cli --config config/ledger.yml --fixture-dir tests/fixtures + +uv run dbt build --project-dir dbt --profiles-dir dbt + +if ! command -v terraform >/dev/null 2>&1; then + echo "terraform is required for local validation (CI uses 1.9.8)" >&2 + exit 1 +fi + +terraform -chdir=infra/gcp fmt -check -recursive +terraform -chdir=infra/gcp init -backend=false +terraform -chdir=infra/gcp validate