Merge pull request #152 from DavidS/codecov
Enable code coverage tracking
This commit is contained in:
commit
840dfca1bc
|
@ -25,7 +25,7 @@ Gemfile.lock
|
|||
## MODULE BUILDS
|
||||
**/pkg
|
||||
|
||||
## RubyMine
|
||||
## RubyMine
|
||||
/.idea/
|
||||
|
||||
## rvm/rbenv
|
||||
|
@ -38,3 +38,6 @@ Gemfile.lock
|
|||
/log/
|
||||
/*.gem
|
||||
/spec/acceptance/nodesets/
|
||||
|
||||
## local coverage results
|
||||
/coverage/
|
||||
|
|
|
@ -27,4 +27,4 @@ matrix:
|
|||
- rvm: 2.1.9
|
||||
env: PUPPET_GEM_VERSION="~> 4" CHECK=rubocop
|
||||
|
||||
script: 'SPEC_OPTS="--format documentation" bundle exec rake $CHECK'
|
||||
script: 'SPEC_OPTS="--format documentation" COVERAGE="yes" bundle exec rake $CHECK'
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -13,10 +13,12 @@ else
|
|||
end
|
||||
|
||||
group :test do
|
||||
gem "rspec", "~> 3.1"
|
||||
gem 'codecov'
|
||||
gem 'mocha'
|
||||
gem 'puppetlabs_spec_helper'
|
||||
gem 'serverspec'
|
||||
gem 'simplecov-console'
|
||||
gem "rspec", "~> 3.1"
|
||||
end
|
||||
|
||||
group :acceptance do
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
# disable comments, info can be gotten from the pr status updates, and the comment editing spams the hipchat notifications
|
||||
comment: false
|
|
@ -1,3 +1,20 @@
|
|||
if ENV['COVERAGE'] == 'yes'
|
||||
require 'simplecov'
|
||||
require 'simplecov-console'
|
||||
require 'codecov'
|
||||
|
||||
SimpleCov.formatters = [
|
||||
SimpleCov::Formatter::HTMLFormatter,
|
||||
SimpleCov::Formatter::Console,
|
||||
SimpleCov::Formatter::Codecov,
|
||||
]
|
||||
SimpleCov.start do
|
||||
track_files 'lib/**/*.rb'
|
||||
|
||||
add_filter '/spec'
|
||||
end
|
||||
end
|
||||
|
||||
require 'mocha'
|
||||
require 'rspec'
|
||||
require 'puppet/version'
|
||||
|
@ -21,4 +38,3 @@ RSpec.configure do |config|
|
|||
YARD::Registry.clear
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue