我给出了一个解决方案 http://entulho.fiatjaf.alhur.es/guias/how-to-use-node-along-with-other-language-on-travis-ci/ 很久以前,但今天仍然有效:
基本上你只需添加
install: - . $HOME/.nvm/nvm.sh - nvm install stable - nvm use stable - npm install
到你的 .travis.yml ,必须设置为不同的语言,它将安装 node 和 npm 。
.travis.yml
node
npm
有时问题出在机器前面......我发现了一个很好的解决方法,我想和你分享。
我创建了一个帐户 https://drone.io/ 在设置选项卡中,我选择了“Go1”的构建,并添加了以下命令:
# install gogrinder dependencies go get ./... # install test dependencies go get golang.org/x/tools/cmd/cover go get -v github.com/axw/gocov go install github.com/axw/gocov/gocov # install nodejs requirements npm -d install ./node_modules/bower/bin/bower install # run the tests on the go code gocov test | gocov report # run the tests on the Angularjs frontend npm test
现在我回到了运行Golang和Karma测试的CI服务器的轨道上。