grodowski / undercover

undercover warns about methods, classes and blocks that were changed without tests, to help you easily find untested code and reduce the number of bugs. It does so by analysing data from git diffs, code structure and SimpleCov coverage reports

Home Page:https://undercover-ci.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stale coverage warning after cloning the repo

grodowski opened this issue · comments

Using undercover in CI may be problematic, because given such a workflow:

- job 1:
  - clone
  - run specs
  - store coverage report
- job 2:
  - clone
  - restore coverage
  - run undercover

we will get the stale coverage message, because files from second clone have newer mtime than the produced coverage report.

Fix: switch from using mtime to git metadata in Undercover::Changeset#last_modified?
Alternative: turn the stage coverage error to a warning, because it's only useful for local usage.

Sample failed build for the ci-test branch: https://circleci.com/gh/grodowski/undercover/27