0
私のテスト用サンプル/テストコードを出力するダミーサーバが必要です。私はそのためにノードのhttpサーバーを使用し、node ./test/server.js
でスクリプトの前に起動します。Travisがサーバを起動してスクリプトを続ける
私はそれを始めることができますが、問題はそれがインスタンスを占有しているため、今すぐテストを実行できないということです。
質問がありますが、どうすればバックグラウンド/新しいインスタンスでサーバーを実行できますか? end_scriptでサーバーを停止するので、終了する必要はありません。
これは、これまで私のトラヴィス-configです:
language: node_js
node_js:
- "6.1"
cache:
directories:
— node_modules
install:
- npm install
before_script:
- sh -e node ./test/server.js
script:
- ./node_modules/mocha-phantomjs/bin/mocha-phantomjs ./test/browser/jelly.html
- ./node_modules/mocha-phantomjs/bin/mocha-phantomjs ./test/browser/form.html
- ./node_modules/mocha/bin/mocha ./test/node/jelly.js
after_script:
- curl http://localhost:5555/close