We are a Scala/Java shop and we use Gradle for our build and Hudson for CI. We recently wrote some node.js code with tests in mocha. Is there anyway to get that included in our gradle workflow and setup in Hudson? I looked at the gradle-javascript-plugin but I could not figure out how to run npm test or npm install through it and not sure how to make it run through gradle-build or gradle-test commands and also let Hudson pick it up.
Share
I can get you part of the way there, I am mid-stream on this task as well. Make sure you have at least Gradle 1.2.
Reference: http://gradle.1045684.n5.nabble.com/State-of-javascript-stuff-in-master-td5709818.html
Provided with a way to compile my coffeescript I can now add the npm install cmd into a groovy exec request and barf depending on the exec cmd result providing stdout/stderr
Results in:
As far as the mocha tests, I don’t have first-hand knowledge of this, however I suspect you can handle similarly.