2 ms·
It’s less common but there are actually CI setups that verify each commit in a PR rather than the tip of the branch.
by dcow 6y ago
It’s less common but there are actually CI setups that verify each commit in a PR rather than the tip of the branch.
- mehrdadn 6y agoThat seems immensely more painful for a nontrivial project though. It'll clog the CI for everyone and nobody will go back and rebase to make sure every single commit is a self-contained passing unit.
- u801e 6y agoIt's trivially easy to do if you run something like: git rebase --exec "test_command" where test_command is one or more commands that you run to test the code for that commit. I typically do this for unit tests and integration tests. If the tests fail for some reason, you can amend the commit to fix the test and then run git rebase --continue to test the next commit.