Trigger build on PR via API

@seglo My previous post was replying to a completely different scenario – they needed to do additional checks that could be made independently from the Travis build.

For your case, runtime checks is the way to go. The most you can do is move the check before any time-consuming logic – e.g. software installation. You can also upvote the Run a chunk of user code before the stock installation logic feature request that would allow you to do this while still taking advantage of stock addons that install stuff.


Be careful though about which tests you exclude. If a change affects one module, you need to run not just unit and integration tests for it but also integration tests for all modules that it interfaces with and full-system tests that use this module’s functionality.


It turns out that Github doesn’t support regular server-side Git hooks – but uses webhooks instead. You can see https://github.com/travis-ci/docs-travis-ci-com/pull/2764 for an example of 3rd-party webhooks with additional checks. This is not for your use case though.