Michael's articles

  1. PHP and Continuous Integration with Travis CI

    Continuous integration (CI) allows a team to commit their work quickly, which means there will be multiple commits to a repository daily. Every time there is a commit it is verified by an automated build (including test) to alert you of any build or test errors immediately. Once the process of integrating and verifying your work into the master becomes automatic you are able to develop cohesive software rapidly.

    What is Travis CI?

    Travis CI automatically sets up a CI environment and makes it simple for anyone to test and deploy their app. Their build system supports many different languages, you just have to define which language this project is and Travis CI will take care of the rest. You can find more information about all the other environments they offer in their docs, but for this article we will focus on adding Travis CI to a PHP repository on GitHub.

    Public repositories on Github can use Travis CI for free, but they share community boxes and sit in queues. To use a private repository with Travis CI you can subscribe to one of their plans and get your project built without waiting, plus you can have concurrent jobs.

    Note: The open source site ends in ‘.org’ (https://travis-ci.org/) and the private repository site ends with ‘.com’ (https://travis-ci.com/).

    Getting Started With Travis CI

    To follow along just fork this example repository. Please feel free to change it’s files and see what the settings do.