Skip to content

JCarlosR/danger-kover

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

danger-kover

A danger plugin for enforcing test code coverage % based on a Kover coverage report.

Danger Kover Warning Messages Multi Module Code Coverage Report

Installation

Add this line to your application's Gemfile:

gem 'danger-kover'

Danger Kover Plugin Usage

It depends on having a Kover coverage report generated for your project.

For Android projects, kotlinx-kover works well.

Running with default values:

# Report coverage of modified files. 
# Fail if either total project coverage or any modified file's coverage is under 70%.
kover.report 'Module Name', 'path/to/kover/report.xml'

Running with custom attributes:

  • Fail if total project coverage is under 70%.
  • Or if any modified file's coverage is under 80%.
kover.total_threshold = 70
kover.file_threshold = 80
kover.report 'Module Name', 'path/to/kover/report.xml'

Optional attribute to only warn instead of failing if below thresholds:

kover.fail_if_under_threshold = false

Credits

This is a fork, based on Shroud.

Development

  1. Clone this repo
  2. Run bundle install to setup dependencies.
  3. Run bundle exec rake spec to run the tests.
  4. Use bundle exec guard to automatically have tests run as you make changes.
  5. Make your changes.

Publishing

How to build a gem (make sure to update the version):

gem build danger-kover.gemspec

How to publish a gem:

gem push danger-kover-VERSION.gem

About

A danger plugin for enforcing code coverage based on a Kover coverage report 🎮

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 100.0%