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