Travis CI Review

Is Travis CI a good CI tool?

Travis CI is a very popular and widely used tool. I was personally using Travis for quite a while and had a good experience.

There are few things you should consider before starting with Travis. It’s very easy to start with Travis. I cannot imagine a faster integration with a CI tool.

All you have to do in order to start is to add your github repo to travis. Hence, you can do this after creating Travis account by authenticating Travis app to access your github repo. From Travis CI settings you will choose if you want travis to run tests for every push and for which branches.
All the configurations of the test environment are specified in travis.yml file.

The key factor in the pricing model of Travis is the number of concurrent jobs. In terms of price Travis CI is not considered to be the most effective solution, as you will have to spend around 129 / month USD for 2 concurrent jobs (i.e. 2 builds running at the same time: https://travis-ci.com/plans).

If you are building an Open Source project, you can still use Travis CI for free, which will navigate you to travis-ci.org (free version of travis-ci.com).

Travis.yml

A sample travis.yml file, would contain information like below:

# php language is used
language: php

# this will enable artifacts addon, which will be sent to you with every email
addons:
 artifacts: true

# using php 5.5 version
php:
 - 5.5

before_script:
# here you list the commands to be run before the build
# usually you might want to install some packages and prepare your build for running

notifications:
# in this section you would specify different methods how you want to be notified
# you can choose slack, email and other methods

after_failure:
# in this section you might choose to do a certain action after_failure (e.g. upload artifacts, etc...)

As you can see the installation script will take around 30 minutes to setup. However you may not feel that you have a full control of the testing environment configuration, as you will be bound to certain underlying structure provided by Travis CI. Sometimes when the test fails you would like to login to the test instance and investigate the exact cause of the failure – this is another thing you would not be able to enjoy with Travis.

Resources

Check out here to find out more information about Travis CI:

http://travis-ci.com
https://travis-ci.com/plans
https://docs.travis-ci.com/user/customizing-the-build/

Majd Arbash

...

Leave a Reply