I have a little open source project that I am trying to slowly improve. One of the steps I’m taking to do this is to add some tests and code static analysis. If something is running correctly I don’t want regressions so I need to plug it to CI so it runs for every commit. A lot of people are using Travis so I decided to give it a try. The first steps can be found at Travis’ getting started page.
My project is a PHP project but it needs node to run grunt tasks so I was worried about not being able to specify two programming languages in the yml file. Luckily Travis includes a version of node on all VMs no matter what type of project you are using, so I could freely use npm and grunt:
1
2
3
4
5
language: php
php:
- "5.4"
before_script: "npm install"
script: "./node_modules/grunt-cli/bin/grunt"
I also found that if you have a very specific requirement you can even use apt-get to download dependencies and then you will be able to use it as part of your task.
automation
git
github
node
php
productivity
projects
]