travis.ci 在运行“bundle exec rake"时一直失败; [英] travis.ci keeps on failing when running "bundle exec rake"

查看:23
本文介绍了travis.ci 在运行“bundle exec rake"时一直失败;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Travis.ci 解决自动化测试问题.但是,目前在尝试执行 bundle exec rake 时,构建一直失败.这是我看到的...

I am trying to get automated testing sorted out with Travis.ci. However, at the moment the build keeps on failing when trying to execute bundle exec rake. This is what I see...

$ bundle exec rake
rake aborted!
Don't know how to build task 'default'
/home/travis/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/home/travis/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

The command "bundle exec rake" exited with 1.

Done. Your build exited with 1.

我的单元测试位于主目录的 test 文件夹中,名为 test_np_search.rb.我知道我应该以某种方式将 travis 指向这个位置以运行单元测试,但我不知道如何做到这一点.

My unit tests are in the test folder in the main directory and is named test_np_search.rb. I understand that I am somehow supposed to point travis to this location in order to run the unit tests but I have no idea how to do this.

我已多次阅读 travis.ci 上与 ruby​​ 相关的文档,并在网上查找教程,但是我一直无法让它工作.

I have read the ruby related documentation on travis.ci a number of times and have looked online for tutorials, however I have been unable to get this to work.

有问题的整个 github 存储库在这里:https://github.com/IsmailM/NeuroPeptideSearch

The whole github repository in question is here: https://github.com/IsmailM/NeuroPeptideSearch

Travis.CI 链接在这里:https://travis-ci.org/IsmailM/NeuroPeptideSearch

The Travis.CI link is here: https://travis-ci.org/IsmailM/NeuroPeptideSearch

一个多星期以来,我一直在努力解决这个问题,并取得了任何成功,如果有人能帮助我,我将不胜感激.

I have been trying to get this sorted for over a week now with any success and so would be highly grateful if anyone could help me.

非常感谢

推荐答案

如果你想在 travis 上执行 bundle exec rake,你必须确保它在你的本地机器上运行!

if you want to execute bundle exec rake on travis, you will have to make sure, that it runs on your local machine!

如果您调用 rake 而不提供任务名称,它将假定您要运行默认任务.

if you call rake without providing a task-name, it will assume that you want to run the default-task.

如果您想将 minitest 测试套件作为默认任务运行,您必须这样做:

if you want to run your minitest testsuite as a default-task, you have to do this:

require "rake/testtask"

Rake::TestTask.new do |t|
  t.pattern = "test/**/*_test.rb"
end

task default: :test

这篇关于travis.ci 在运行“bundle exec rake"时一直失败;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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