diff --git a/.github/workflows/bindings-check.yml b/.github/workflows/bindings-check.yml index 3136666..61438a9 100644 --- a/.github/workflows/bindings-check.yml +++ b/.github/workflows/bindings-check.yml @@ -58,3 +58,5 @@ jobs: - name: Check generated bindings are up to date run: pnpm bindings:check + - name: Fail if the worktree is dirty after the bindings check + run: git diff --exit-code diff --git a/docs/CI.md b/docs/CI.md index 4a3af75..b9a7295 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -60,6 +60,25 @@ ratio after including unexecuted `src/` files. Lower the threshold only when the existing codebase cannot meet a higher bar yet; prefer adding tests instead of weakening the gate. +## Bindings worktree cleanliness gate + +After `pnpm bindings:check` regenerates the round contract's TypeScript +bindings, CI runs `git diff --exit-code` so any unexpected drift in a +tracked, generated file is visible and blocking, not just the specific +`index.ts` comparison `bindings:check` already does on its own. + +### CI workflow + +`.github/workflows/bindings-check.yml`, immediately after the +"Check generated bindings are up to date" step. + +### Run locally + +```bash +pnpm bindings:check +git diff --exit-code +``` + ## Bindings check GitHub Actions workflow: `.github/workflows/bindings-check.yml`