Skip to content

Commit c401722

Browse files
committed
Add codeclimate test reporter (CI only)
requires repo admin to add CODECLIMATE_REPO_TOKEN to the CI env
1 parent 94469be commit c401722

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.simplecov

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ end.new do
8181
SimpleCov.start 'app'
8282
if @generate_report
8383
if @running_ci
84-
@output.puts '[COVERAGE] Running with SimpleCov Simple Formatter'
85-
formatters = [SimpleCov::Formatter::SimpleFormatter]
84+
require 'codeclimate-test-reporter'
85+
@output.puts '[COVERAGE] Running with SimpleCov Simple Formatter and CodeClimate Test Reporter'
86+
formatters = [
87+
SimpleCov::Formatter::SimpleFormatter,
88+
CodeClimate::TestReporter::Formatter
89+
]
8690
else
8791
@output.puts '[COVERAGE] Running with SimpleCov HTML Formatter'
8892
formatters = [SimpleCov::Formatter::HTMLFormatter]

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ group :test do
2929
gem 'activerecord'
3030
gem 'sqlite3', platform: :ruby
3131
gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
32+
gem 'codeclimate-test-reporter', require: false
33+
end
3234

3335
group :test, :development do
3436
gem 'simplecov', '~> 0.10', require: false

0 commit comments

Comments
 (0)