Gilbert Pellegrom Gilbert Pellegrom

6th October 2015

Setting up Laravel 5 for Travis CI

Continuous integration testing is awesome and if you build software with a team you really should have it up and running. Travis CI is a free (for public repos) service which connects to your GitHub repositories and automatically runs your tests whenever someone pushes to your repo (all configurable of course). This means you can see at a glance if a PR is failing your tests, and therefore probably breaking your code.

Today, for the first time, I tried setting up a Laravel 5 project in Travis CI and ran into a few issues with the database config. So I thought I’d share how I ended up tweaking my project to get things working properly with Travis.

I wanted to use a different database for testing so I had already set that up. Here is what I had to do to get it to work: