gpt4 book ai didi

travis-ci - 将 codeclimate 与 travis-ci 集成,travis 始终无法加载 codeclimate-test-reporter

转载 作者:行者123 更新时间:2023-12-02 07:55:07 34 4
gpt4 key购买 nike

这是有问题的公共(public)存储库:https://travis-ci.org/agerwick/raw-sinatra-boilerplate

我按照此处的建议集成了 codeclimate 的测试报告程序 gem:http://docs.travis-ci.com/user/code-climate/

我不断收到的错误是:/home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54 :in 'require': 无法加载此类文件 -- codeclimate-test-reporter (LoadError)

从下面的日志中可以看到,Travis CI 正在安装 codeclimate-test-reporter gem。我尝试使用 CODECLIMATE_REPO_TOKEN 环境变量集从本地计算机运行测试,这里它工作得很好,更新了代码气候测试覆盖率状态。因此,问题仅出现在 travis 上。

关于下一步如何尝试以使 Travis CI 正确要求 codeclimate-test-reporter 有什么建议吗?

出于历史目的,以下是 Travis CI 的日志:

Using worker: worker-linux-9-1.bb.travis-ci.org:travis-linux-16
system_info
Build system information
Build language: ruby
git.checkout
0.06s$ git clone --depth=50 --branch=master git://github.com/agerwick/raw-sinatra-boilerplate.git agerwick/raw-sinatra-boilerplate
Cloning into 'agerwick/raw-sinatra-boilerplate'...
remote: Counting objects: 223, done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 223 (delta 27), reused 0 (delta 0)
Receiving objects: 100% (223/223), 45.36 KiB | 0 bytes/s, done.
Resolving deltas: 100% (89/89), done.
Checking connectivity... done.
$ cd agerwick/raw-sinatra-boilerplate
$ git checkout -qf d659d86167d5c60f52e4013190ee5fd45dbb4b00
rvm
0.47s$ rvm use 2.0.0 --install --binary --fuzzy
Using /home/travis/.rvm/gems/ruby-2.0.0-p594
$ export BUNDLE_GEMFILE=$PWD/Gemfile
$ ruby --version
ruby 2.0.0p594 (2014-10-27 revision 48167) [x86_64-linux]
$ rvm --version
rvm 1.26.0 (master) by Wayne E. Seguin <wayneeseg<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="54213d3a143339353d387a373b39" rel="noreferrer noopener nofollow">[email protected]</a>>, Michal Papis <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="563b2637263f2516313b373f3a7835393b" rel="noreferrer noopener nofollow">[email protected]</a>> [https://rvm.io/]
$ bundle --version
Bundler version 1.7.4
$ gem --version
2.4.2
before_install.1
0.01s$ export DISPLAY=:99.0
before_install.2
0.01s$ sh -e /etc/init.d/xvfb start
Starting virtual X frame buffer: Xvfb.
install.bundler
143.23s$ bundle install --jobs=3 --retry=3 --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching git://github.com/agerwick/rack-minitest.git
Installing mini_portile 0.6.1
Installing mime-types 2.4.3
Installing rack 1.5.2
Installing minitest 5.4.3
Installing docile 1.1.5
Installing json 1.8.1
Installing multi_json 1.10.1
Installing tilt 1.4.1
Using bundler 1.7.4
Installing simplecov-html 0.8.0
Installing rack-test 0.6.2
Installing rack-protection 1.5.3
Installing shotgun 0.9
Installing travis-lint 2.0.0
Installing haml 4.0.5
Installing simplecov 0.9.1
Using rack-minitest 0.0.9 from git://github.com/agerwick/rack-minitest.git (at master)
Installing sinatra 1.4.5
Installing codeclimate-test-reporter 0.4.1
Installing nokogiri 1.6.4.1
Installing xpath 2.0.0
Installing capybara 2.4.4
Installing capybara_minitest_spec 1.0.5
Installing capybara-webkit 1.3.1
Your bundle is complete!
It was installed into ./vendor/bundle
Post-install message from haml:
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:Installing docile 1.1.5
Installing json 1.8.1
Installing multi_json 1.10.1
Installing tilt 1.4.1
Using bundler 1.7.4
Installing simplecov-html 0.8.0
Installing rack-test 0.6.2
Installing rack-protection 1.5.3
Installing shotgun 0.9
Installing travis-lint 2.0.0
Installing haml 4.0.5
Installing simplecov 0.9.1
Using rack-minitest 0.0.9 from git://github.com/agerwick/rack-minitest.git (at master)
Installing sinatra 1.4.5
Installing codeclimate-test-reporter 0.4.1
Installing nokogiri 1.6.4.1
Installing xpath 2.0.0
Installing capybara 2.4.4
Installing capybara_minitest_spec 1.0.5
Installing capybara-webkit 1.3.1
Your bundle is complete!
It was installed into ./vendor/bundle
Post-install message from haml:
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:

* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem
For more info see:
http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
0.30s$ rake all
/home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- codeclimate-test-reporter (LoadError)
from /home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/spec_helper.rb:5:in `<top (required)>'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic_test_helper.rb:2:in `require_relative'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic_test_helper.rb:2:in `<top (required)>'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic/test_lib_core.rb:1:in `require_relative'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic/test_lib_core.rb:1:in `<top (required)>'
from /home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb:15:in `block in <main>'
from /home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -I"lib" -I"/home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib" "/home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb" "test/business_logic/test_lib_core.rb" "test/database_calls/test_availability.rb" "test/acceptance/test_hello.rb" "test/acceptance/test_welcome.rb" "test/requests/test_index.rb" ]
/home/travis/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => all
(See full trace by running task with --trace)
The command "rake all" exited with 1.
Done. Your build exited with 1.

最佳答案

看起来 codeclimate-test-reporter gem 无法在运行时加载,这似乎是捆绑程序问题。

您应该尝试将 rake all 更改为 bundle exec rake all

关于travis-ci - 将 codeclimate 与 travis-ci 集成,travis 始终无法加载 codeclimate-test-reporter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26953315/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com