This way it is even easier to find the offending commit, because changes are smaller (yes, sometimes not working at all).
This way it is even easier to find the offending commit, because changes are smaller (yes, sometimes not working at all).
And there is a difference between entirely broken builds and not-tested ones.
depends on the repo structure
> And there is a difference between entirely broken builds and not-tested ones.
depends on your testing philosophy and process
You would still be able to commit and push to your feature branch without breaking the CI. I guess it would be possible to enforce the rules on feature branches but that would be counter productive IMO.
Frequent commits (without making sure they pass tests) allow better git blame/annotate (figuring out why given line of code was added, and having a general comment "introduce feature ABC" is not helpful, but having a message "add field to to something" is).
You can't make detailed commit messages if you have large changes.
But yeah, everything depends on the workflow one commits to.
Honestly I don’t really see why would you want to change code that breaks tests without updating them in the same commit. Updates in tests give strong signal to the PR reviewer to see that an API has changed. When fixing bugs it’s also nice to be able to reproduce it with a test case first, then fix it.
You don't commit when the tests fail.