Skip to content

CI: Track spec coverage via simplecov

Peter Leitzen requested to merge pl-simplecov into master

What does this MR do and why?

This MR adds spec coverage via SimpleCov. It runs in CI (also using cobertura reports - only for Ruby 3.0 to save CPU cycles) and locally (HTML format). It can be disabled via SIMPLECOV=0 bundle exec rspec.

This was inspired while moving cops in !151 (merged). Some cops did not have specs and were missing code coverage.

https://gitlab-org.gitlab.io/-/ruby/gems/gitlab-styles/-/jobs/3587879161/artifacts/coverage/index.html https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles/-/jobs/3587879161#L757
Screenshot_from_2023-01-11_17-18-47 Screenshot_from_2023-01-11_17-21-22

Potential follow-ups

Edited by Peter Leitzen

Merge request reports