Travis CI creates two builds for each Github commit push

What's happening in your scenario looks like this:

continuous-integration/travis-ci/push - only run test on branch

continuous-integration/travis-ci/pr - merge and run tests

And this is completely okay - but if you want to get rid of one of the builds you need to disable Build pushes or Build pull requests in your project settings on Travis.


Sources:

https://github.com/travis-ci/travis-ci/issues/1504

https://github.com/twisted/twistedchecker/pull/93

https://blog.travis-ci.com/2014-03-05-repository-settings/


You can uncheck either building pushes or PRs in the TravisCI settings for the repository: settings SS

The difference between them is:

  • /pr builds automerged state (as if you merged the PR and ran the tests on that, note: it won't run if the PR can't be automerged).
  • /push builds for the current state of the branch you pushed to (as if you ran the tests on your local copy you just pushed),