How to run local commands like 'npm test' with Capistrano
Before I deploy, I want to run my test suite locally (executed with npm test
). I also want the deployment to stop if the tests fail.
I created a new file in lib/capistrano/tasks
. I called it test.rake
. Here are the contents:
|
|
Then, in my deploy.rb
deploy block, I run the command like this:
|
|