Travis-CI Badges

This is the second post in my series on GitHub Badges.

Another badge you are likely to have seen looks like this:


Or likely a greener version of the same. These badges link to a continuous integration service of some kind. The most common one I have seen is travis-ci. Travis supports pretty much all the major languages.

Like most online codebase services linked to GitHub, this service is available for free to open source projects, which really just means public repos.

Setting up a project on Travis is amazingly simple. The first step is to sign in, Travis uses GitHub for authentication via OAuth, so there really is no sign-up process. Once you are signed in, travis will present you with a list of your public repos like this:

Screen Shot 2013-12-12 at 9.33.38 PM

Initially all of the switches will be in the off position, just flick a switch to on and travis will start watching the repo. The final step is simply to add a .travis.yml file in the root of your project. This files is usually pretty trivial, for example:

language: ruby
  - 2.0.0
  - 1.9.3
  - 1.9.2

The above file is all that is required to have travis build a standard ruby project against three different versions of ruby. That is really all that is required assuming you follow standard conventions for your tests, etc. To trigger a build, you can either push a commit or click a button in the travis web app.

Travis also supports some more advanced features like deployment of web apps that I will cover in a future post. And, of course, the build status is available in the form of a badge that can be inserted into a markdown README file.

As I mentions at the beginning, Travis is free for public repos, but there is also a pay service for private repos.  The monthly pricing at the time of this writing was $129, $249, and $489 per month for 2, 5, and 10 concurrent jobs respectively. All plans allow an unlimited number of repos, collaborators, and build minutes. This pricing is quite reasonable for a small business with team especially with a number of projects. However, I find it a little steep for an individual freelancer with just a coupe of side projects. Personally, I would like to see a cheaper plan with some limitations on projects and collaborators.

3 responses to “Travis-CI Badges”

  1. […] for private repos is a pay service and provides some additional services like integration with TravisCI, Semaphore, or Solano for code coverage, and Pivotal Tracker, Lighthouse, or GitHub to track […]

Leave a Reply

Your email address will not be published. Required fields are marked *