是否可以设置travis来运行多种语言的测试? [英] Is it possible to set up travis to run tests for several languages?

查看:160
本文介绍了是否可以设置travis来运行多种语言的测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个rails项目,并且正在通过为我的JavaScript测试( Jasmine )运行测试. href ="http://karma-runner.github.io" rel ="noreferrer">业力

I have a rails project and am running tests for my JavaScript test (Jasmine) through Karma

.travis.yml文件

.travis.yml file

language: ruby
rvm:
  - 2.0.0
script:
  - RAILS_ENV=test bundle exec rake --trace db:migrate test
  - karma start --single-run --browsers PhantomJS test/karma/config/unit.js

Travis无法说没有找到业力.有没有一种方法可以将node_js定义为另一种语言,并在构建VM上安装业力?

Travis fails saying it does not find karma. is there a way to define node_js as another language and install karma on the build VM?

推荐答案

它是

It is not possible yet to have several languages on travis configuration file.

另一方面,所有环境运行node.js .以下脚本可以解决问题:

On the other hand, all environments run node.js. The following script does the trick:

language: ruby
rvm:
  - 2.0.0
before_script:
  - npm install karma
script:
  - RAILS_ENV=test bundle exec rake --trace db:migrate test
  - karma start --single-run --browsers PhantomJS test/karma/config/unit.js

Google网上论坛的旧主题中找到帮助

这篇关于是否可以设置travis来运行多种语言的测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆