Using Phing with Travis CI

Posted by Unknown on Thursday, July 17, 2014

We've started using Travis CI on one of my projects to run some build processes to check that everything looks good before we merge/deploy code. One thing I ran into quite quickly was that I wanted to install phing in order to use the build scripts we already have and use elsewhere, but that it isn't provided by default by Travis CI.


In fact, you can install phing by adding it to the before_install section of your .travis.yml; so the file could look something like this:




language: php
php:
- "5.4"

before_install:
- pear channel-discover pear.phing.info
- pear install phing/phing
- phpenv rehash

script:
- phing -f src/build.xml phplint

That rehash is the magic sauce that makes your path pick up phing and so be able to run the command in the script section. I expect phing to be quite a common requirements for PHP projects, so it's good to know that it can easily be used with TravisCI.


Lorna is an independent web development consultant, author and trainer, available for work (interesting projects only). This post was originally published at LornaJane




more

{ 0 comments... » Using Phing with Travis CI read them below or add one }

Post a Comment

Popular Posts