Enabling Travis build check on Pull request

We have Travis configured to run every time any changes are merged into master branch. We can also use Travis to build and test Pull requests. We can even prevent Pull requests that have failed tests from being merged using GitHub's status check feature. Using Travis will help prevent bad code from being merged into master and ensure that failing builds do not get merged into master. To enable this, we need to update few settings on GitHub. Perform the following steps to enable Travis on every Pull request:

  1. Go to the Settings page of your repo on GitHub and click on Branches.
  2. Under the Protected branches section, click on Choose a branch... and select master:
  1. Check Protect this branch. This ...

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.