To put it in "BDD" terms:
Background:
Given I'm contributing to a GH repoWhen I create a pull request
Then Travis should build the latest commitWhen I push to an existing pull request
Then Travis should build the latest commitWhen I merge a pull request to master
Then Travis should build master
I was confused by Travis-CI's "build pushes" and "build PRs" settings, as:
- Enabling both causes each Pull Request to be build twice by Travis
- once for the commit on that branch
- and once again for the merge commit of that branch into its destination
- Enabling just "build PRs" causes PRs to be built, but doesn't result in post-merge builds (i.e. on master).
- Enabling "pushes" brute-force satisfies the above criteria by building all pushes to the repo. You can try to finagle things by white- & black-listing branches, but that will probably bite you unless you're rigorously disciplined with branch names.
This is explained more in Travis-CI docs and GH issue #3241.
Anyone know a configuration that satisfies the above criteria?