My Continuous Integration works pretty great using Codeship except one thing: stop deploying and alert us when unit tests are failing.
Here is our current commands:
- npm install
- npm install bower
- bower install
- gulp test
- gulp build
The problem is whether gulp test end with success or fail, the gulp build builds.
I succeed to console.log() my gulp test exit status but I have no idea about how to make Codeship listen to this exit status.
Using @mlocker answer and this discussion on Github, I've found a workaround that works fine for me:
The trick here is that if the exitStatus is different from 0, you'll get a formatError on "There are failing unit tests" which will exit
gulp testwith1making Codeship to stop and consider the build asfailed.