4 ms·
Yes of course, every commit on your main branch should pass CI.
by dullcrisp 3y ago
Yes of course, every commit on your main branch should pass CI.
- cryptonector 3y ago> Yes of course, every commit on your main branch should pass CI. Or when you fix a bug first you put the regression test in a new commit first then the fix, that way you can show that a) the test finds the bug that is b) fixed by the subsequent commit. This means you need to git bisect skip such commits, but that's fine.
- jsmeaton 3y agoEven better, if your testing framework supports it, mark the test as expecting failure in your regression commit, then remove the xfail in the commit that fixes the bug.
- MBlume 3y agoI actually prefer to add a passing test asserting the bug exists in one commit, then fix the bug and reverse the sense of the test in a second commit. The second commit is now more or less self documenting -- this case used to produce this buggy behavior but now produces correct behavior -- and the fact that the test originally passed provides proof that the test is capable of detecting a regression.
- david_allison 3y agoPut the failing test into the codebase with an `@Ignore`, have the second commit remove the `@Ignore`
- jononor 3y agoAt least every merge point. That is easy to enforce with GitHub/Gitlab etc. Is there a way for git bisect to only try those commits?