Prefect: Fix Codecov bot to only update after all reports are in

Created on 2 Jun 2019  路  6Comments  路  Source: PrefectHQ/prefect

Currently, our helpful Codecov bot will begin posting coverage stats when one of the lighter CI jobs is complete and has submitted its report. For example, on #1101 the first post by codecov was:
Screen Shot 2019-06-02 at 10 33 22 AM
This can be confusing and misleading to new contributors.

Ideally, the bot should wait for all "expected" reports to be submitted before posting a coverage report. I tried looking into this at one point but couldn't figure out if it was possible.

good first issue help wanted tests

Most helpful comment

I can look into it this week, I'm tired of getting roasted by the Codecov bot 馃槃

All 6 comments

I can look into it this week, I'm tired of getting roasted by the Codecov bot 馃槃

Yea, that'd be great! In each CI job that uploads coverage, there are only two things that are codecov related:

  • in each pytest command that is intended to generated coverage, we use the --cov=prefect flag
  • after each pytest is run, we upload coverage to codecov with bash <(curl -s https://codecov.io/bash) -cF python

Here is an example: https://github.com/PrefectHQ/prefect/blob/master/.circleci/config.yml#L89-L95

would it be okay for me to open a dummy PR just to test changes to the circleci config file?

Struggling to find a way to test workflows locally

Yea, go for it @zangell44

Sorry @cicdw, I couldn't figure this one out this week, closed my PR so it doesn't linger.

For future reference, I suspect the best way to do it is using codecov flags. This would involve flagging different reports by

  1. Changing -cF python in the circleci config to -cF <moreSpecificTestFlag> (e.g. python35)
  2. Enumerating flags properly in codecov.yml

No worries @zangell44 ! Thanks for giving it a solid effort, it is definitely appreciated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gryBox picture gryBox  路  3Comments

cicdw picture cicdw  路  3Comments

jlowin picture jlowin  路  3Comments

dkapitan picture dkapitan  路  3Comments

GZangl picture GZangl  路  3Comments