简体   繁体   中英

Is there a way to exempt files / folders from Coveralls test coverage scoring?

My team is using coveralls.io in our CI process to give us an rspec coverage score. We're also using the ActiveAdmin gem for internal use and the decision was made to not cover ActiveAdmin functionality in our test coverage. Does anyone know how we can exempt the /app/admin folder from coveralls so that it doesn't drag our score down?

How I was able to solve this:

  1. Added file '.simplecov' to project root
  2. In '.simplecov' added code:

     require 'simplecov' require 'coveralls' SimpleCov.formatter = Coveralls::SimpleCov::Formatter SimpleCov.start do add_filter 'app/admin' end 

Basic instructions on this functionality is described at https://github.com/colszowka/simplecov#string-filter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM