Back to feed
Dev.to
Dev.to
7/22/2026
TRUE Coverage: How We Achieved 90% Faster CI by Measuring What Tests Actually Do

TRUE Coverage: How We Achieved 90% Faster CI by Measuring What Tests Actually Do

Short summary

The author describes a technique to cut CI time by up to 90% by collecting per-test coverage data and building a reverse map from source files to the tests that touch them. On each PR, a git diff is cross-referenced against this map to run only the relevant tests. The approach is language-agnostic, works with Istanbul, coverage.py, SimpleCov, and JaCoCo, and requires roughly 500 lines of code with zero ongoing maintenance.

  • Build a reverse map (source file → tests) using per-test coverage data
  • Git diff + map lookup selects only relevant tests, cutting CI from 43min to 4min
  • Works across JS, Python, Ruby, and Java with existing coverage tools

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more