Skip to content

chore(hooks): mirror CI checks in pre-push hook#425

Merged
BryanFRD merged 1 commit into
mainfrom
chore/precommit-mirror-ci
May 10, 2026
Merged

chore(hooks): mirror CI checks in pre-push hook#425
BryanFRD merged 1 commit into
mainfrom
chore/precommit-mirror-ci

Conversation

@BryanFRD

@BryanFRD BryanFRD commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the test-only pre-push with the fmt+clippy pair that gates the CI 'Test' job and currently slip through to GitHub Actions every push. The full test suite (cargo nextest) is intentionally left out of pre-push — the cargo crate is heavy enough that running tests on every push would push the hook well past the 3-minute developer-budget.

.githooks/pre-push runs:

  • cargo fmt --all -- --check (mirrors test.Format check)
  • cargo clippy --all-targets -- -D warnings (mirrors test.Clippy)

Skips:

  • cargo nextest run --no-fail-fast — too slow for a pre-push budget; CI keeps running it.
  • cargo audit / cargo deny / cargo machetesecurity job covers these in CI.
  • Coverage / fixtures / benchmarks — CI artefacts, not type-soundness gates.

To activate: run bash .githooks/install.sh once (sets core.hooksPath=.githooks).

Test plan

  • cargo fmt --check and cargo clippy --all-targets -- -D warnings pass on a clean checkout
  • bash .githooks/install.sh then git push --dry-run does not crash

Copilot AI review requested due to automatic review settings May 8, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@BryanFRD BryanFRD closed this May 10, 2026
@BryanFRD BryanFRD reopened this May 10, 2026
@BryanFRD BryanFRD merged commit adc667c into main May 10, 2026
20 of 35 checks passed
@BryanFRD BryanFRD deleted the chore/precommit-mirror-ci branch May 10, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants