1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-01-31 17:27:13 +00:00

Check code coverage of tests using coveralls

This commit is contained in:
Holger Just 2017-02-16 23:26:24 +01:00
parent 0339d4bced
commit 411465073f
3 changed files with 27 additions and 0 deletions

View File

@ -26,6 +26,9 @@ rvm:
jdk:
- oraclejdk8
env:
- COVERAGE=1
matrix:
allow_failures:
- rvm: ruby-head

View File

@ -11,3 +11,8 @@ platforms :mri do
# Complete Markdown package for yard
gem 'redcarpet'
end
group :coverage do
gem 'simplecov', :require => false
gem 'coveralls', '~> 0.8.18', :require => false
end

View File

@ -3,6 +3,25 @@
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE.txt file for details.
if ENV['COVERAGE']
require 'simplecov'
require 'coveralls'
if ENV['TRAVIS']
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
else
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
end
SimpleCov.start do
project_name 'Rackstash'
add_filter '/spec/'
end
end
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'rackstash'