Skip to content

chore(precommit): run pytest on pre-push, match CI fully#71

Merged
madtank merged 1 commit intodev/stagingfrom
orion/precommit-run-tests
Apr 18, 2026
Merged

chore(precommit): run pytest on pre-push, match CI fully#71
madtank merged 1 commit intodev/stagingfrom
orion/precommit-run-tests

Conversation

@madtank
Copy link
Copy Markdown
Member

@madtank madtank commented Apr 18, 2026

Summary

  • Adds a local pytest tests/ hook at the pre-push stage so the full CI bar (ruff check + ruff format --check + pytest) is enforced locally before anything hits origin.
  • Sets default_install_hook_types: [pre-commit, pre-push] so a single pre-commit install --install-hooks wires up both stages.
  • Updates the setup comment to reflect the new install command.

Why

PR #70's lint failure (ruff format --check caught ax_cli/commands/channel.py) is exactly the class of regression the existing hooks were supposed to prevent — but hooks were never installed locally for that worktree. Making install one command and extending coverage to tests closes the gap.

Test plan

  • pre-commit run --all-files → ruff check + ruff format Passed
  • pre-commit run --all-files --hook-stage pre-push → all three Passed
  • Push of this branch triggered the pre-push hook; pytest ran locally before git push completed

🤖 Generated with Claude Code

Mirrors CI's three checks (ruff check, ruff format --check, pytest) so
lint-only failures like PR #70's channel.py format miss get caught
locally before push. Pytest runs at pre-push stage to keep everyday
commits fast.

Setup now:
  pip install pre-commit
  pre-commit install --install-hooks   # installs both pre-commit and pre-push

Verified: ruff check, ruff format, pytest tests/ all pass via
`pre-commit run --all-files` and `... --hook-stage pre-push`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@madtank madtank merged commit 5adc338 into dev/staging Apr 18, 2026
6 checks passed
@madtank madtank deleted the orion/precommit-run-tests branch April 18, 2026 05:08
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.

1 participant