Adam Culp has a new post to his site sharing some of his fun with Travis CI and his PHP-based applications. He recently started using it and provides a step-by-step guide of how he got started with some handy tips along the way. Travis CI is a continuous integration platform providing processes that run automated testing or other build processes when new commits are made to a repository.
I know I should have done this a long time ago, but I finally got my hands dirty with Travis CI. I wanted to set up a php project on github to use Travis CI to monitor the status, in case I forgot to run the tests prior to pushing. Unfortunately it was not as easy as it's made out to be. But now that I've done it once, it'll be easier next time. So, here is how I tackled it.
He walks you through five (or really six) different steps to getting a build process set up for your repository (complete with screenshots):
- Create a Travis CI account and link it to your GitHub account
- Add the repository to connect the build to
- Make a ".travis.yml" file to configure the build (his runs PHPUnit tests)
- Validate that PHPUnit runs locally
- Verify the webhook for Travis CI has been set up correctly
Finally, he includes a bit of description about a successful build and how to add the "badge" showing the current build status to the README of your repository (using Markdown syntax).