Hacker News new | ask | show | jobs
by i13e 958 days ago
pre-commit more or less does this. When you install locally as a git hook it will only test on changes that are being committed.
2 comments

But is it smart enough to go and test transient deps of code you've made changes to?

I've been impressed by Pants (Python build tooling) which manages this really well https://www.pantsbuild.org/docs/advanced-target-selection#ru...

I've always liked the theory of this but not the implementation. I'm a big fan of squash merges so my branches are a mess of commi that each may not even build let alone pass tests. If I had to run tests each commit it would slow things down significantly for little benefit.

I wish it was more nuanced

I use pre-commit and have a git alias for those wip commits.

  cmnv = commit --no-verify