Reputation: 79
I'm facing with the following problem, trying to execute code climate reporter on .travis.yml:
Code Climate encountered an exception: CodeClimate::TestReporter::InvalidPayload No source files were found in the test report payload
Is there anybody here who could help me?
Upvotes: 4
Views: 350
Reputation: 5333
Add
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
at the beginning of file spec_helper.rb
.
Upvotes: 2
Reputation: 452
Can you post your spec_helper.rb file? This error can be because of quite a few reasons :
Calling SimpleCov.start and CodeClimate::TestReporter.start
Add SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, CodeClimate::TestReporter::Formatter ]
So, the final spec_helper.rb is something like this :
require "codeclimate-test-reporter" <br>
require 'simplecov'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[SimpleCov::Formatter::HTMLFormatter,CodeClimate::TestReporter::Formatter]
dir = File.join("..", "coverage")
SimpleCov.coverage_dir(dir)
SimpleCov.start CodeClimate::TestReporter.configuration.profile
Upvotes: 1