barosl / homu

A bot that integrates with GitHub and your favorite continuous integration service
http://homu.io/
MIT License
661 stars 102 forks source link

homu should avoid spurious builds when using Travis CI #93

Closed metajack closed 9 years ago

metajack commented 9 years ago

Right now the default homu flow when using travis causes these builds:

1) Original PR commit built by travis (which is actually a merge commit with master) 2) auto branch when homu merges for testing 3) master branch when the final merge happens

Build 3 is redundant always, since that merge is always a fast forward with homu. You can remove this spurious build by adding branches: except: - master to .travis.yml, but unfortunately that turns of PR builds altogether.

However, Build 2 is often redundant as well. Travis CI already tests a merge commit, not the branch commit. In the case where master has not advanced past where homu tested it, homu could skip this build altogether and merge immediately. This would make the workflow even faster.

stefanpenner commented 9 years ago

but unfortunately that turns of PR builds altogether.

This may be good actually, if homu takes over all CI runs, it would have sufficient knowledge to skip redundant CI runs.

  1. PR is submitted
  2. homu kicks off CI run, stores result + reports back
  3. if a reviewer then says @homu r+, and no additional commits to master, homu can insta merge.

If mainline commits land, and then a reviewer says @homu r+, homu clearly needs to re-run.

––––

I suppose passing off to homu entirely could be mitigated if it had the ability to peek into the relevant CI run. (Which it may already be able to do)

metajack commented 9 years ago

That could work if homu took over all the scheduling functions of travis.