DataDog / datadog-ci-rb

Ruby library for Datadog test visibility
https://docs.datadoghq.com/continuous_integration/tests/ruby
Other
8 stars 4 forks source link

[CIVIS-8552] ci-queue support for rspec #112

Closed anmarchenko closed 9 months ago

anmarchenko commented 9 months ago

What does this PR do? Fix #96

Adds RSpec instrumentation support when running with ci-queue test runner. It instruments RSpec::Queue::Runner that is used by ci-queue and also creates "single-test" test suite akin to Minitest parallel tests if we detect to be running in a RSpec::Core::Example instrumented by ci-queue. Also it fixes our handling of pending tests correctly marking them as skipped and adds a lot of unit tests around all of the ways we can skip tests in RSpec

Motivation We have users of this library who run their rspec test suites using ci-queue

codecov-commenter commented 9 months ago

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (c3ccfee) 99.06% compared to head (1d7d3ac) 98.96%.

Files Patch % Lines
...c/datadog/ci/contrib/rspec/instrumentation_spec.rb 93.20% 7 Missing :warning:
lib/datadog/ci/contrib/rspec/example.rb 85.71% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #112 +/- ## ========================================== - Coverage 99.06% 98.96% -0.11% ========================================== Files 149 151 +2 Lines 6308 6469 +161 Branches 288 299 +11 ========================================== + Hits 6249 6402 +153 - Misses 59 67 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.