mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
Use new Codeclimate test reporter (#400)
* Use new Codeclimate test reporter It let's us combine the reports from both, rspec and test/unit. * Check if coverage drop comes from config change * Revert "Check if coverage drop comes from config change" This reverts commit f8f91fe9664a22a8307b3a328aa6510c876b7dff.
This commit is contained in:
committed by
Bastian Greshake
parent
d2146542e6
commit
fcecb4f732
@@ -16,6 +16,9 @@ before_script:
|
||||
- cp config/database.yml.ci config/database.yml
|
||||
- cp .env.example .env
|
||||
- bundle exec rake db:setup
|
||||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > bin/cc-test-reporter
|
||||
- chmod +x bin/cc-test-reporter
|
||||
- bin/cc-test-reporter before-build
|
||||
script: bundle exec rake
|
||||
deploy:
|
||||
provider: script
|
||||
@@ -30,4 +33,7 @@ notifications:
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
after_success:
|
||||
- bundle exec codeclimate-test-reporter
|
||||
- bin/cc-test-reporter format-coverage -t simplecov -o ./coverage/test-unit/codeclimate.json coverage/test-unit/.resultset.json
|
||||
- bin/cc-test-reporter format-coverage -t simplecov -o ./coverage/rspec/codeclimate.json coverage/rspec/.resultset.json
|
||||
- bin/cc-test-reporter sum-coverage --parts 2 coverage/test-unit/codeclimate.json coverage/rspec/codeclimate.json
|
||||
- bin/cc-test-reporter upload-coverage
|
||||
|
||||
1
Gemfile
1
Gemfile
@@ -62,7 +62,6 @@ gem 'sass-rails'
|
||||
#end
|
||||
|
||||
group :test do
|
||||
gem 'codeclimate-test-reporter', '~> 1.0.0'
|
||||
gem 'test-unit' # TODO: Remove me
|
||||
gem 'minitest' # TODO: Remove me
|
||||
gem 'rspec-rails'
|
||||
|
||||
@@ -94,8 +94,6 @@ GEM
|
||||
cliver (0.3.2)
|
||||
cocaine (0.5.8)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
codeclimate-test-reporter (1.0.8)
|
||||
simplecov (<= 0.13)
|
||||
coderay (1.1.1)
|
||||
composite_primary_keys (8.1.5)
|
||||
activerecord (~> 4.2.0)
|
||||
@@ -402,7 +400,6 @@ DEPENDENCIES
|
||||
bcrypt-ruby
|
||||
capistrano (~> 2.0)
|
||||
capybara
|
||||
codeclimate-test-reporter (~> 1.0.0)
|
||||
composite_primary_keys (~> 8.0)
|
||||
database_cleaner
|
||||
dotenv-rails
|
||||
|
||||
3
Rakefile
3
Rakefile
@@ -7,5 +7,4 @@ require 'rake'
|
||||
|
||||
Snpr::Application.load_tasks
|
||||
|
||||
task test: :spec
|
||||
task default: :test
|
||||
task default: [:spec, :test]
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
require 'simplecov'
|
||||
SimpleCov.start
|
||||
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require 'simplecov'
|
||||
SimpleCov.start('rails') do
|
||||
coverage_dir('coverage/rspec')
|
||||
end
|
||||
require File.expand_path("../../config/environment", __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'sidekiq/testing'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
ENV['RAILS_ENV'] = 'test'
|
||||
unless ENV['CI']
|
||||
require 'simplecov'
|
||||
SimpleCov.start('rails')
|
||||
require 'simplecov'
|
||||
SimpleCov.start('rails') do
|
||||
coverage_dir('coverage/test-unit')
|
||||
end
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require "test/unit"
|
||||
|
||||
Reference in New Issue
Block a user