Add Flow type coverage to frontend build

Description

Flow can generate static type-checking coverage for our javascript code in the zanata-frontend module.

  • We should have the build fail if type coverage decreases (or drops below a manually-set threshold).

    • It is probably feasible to reach 100% type coverage eventually.

    • The reason for build failure should be easy for devs to discover, preferably on the index page of the failed Jenkins build

    • The failed build should direct developers to the uncovered lines and provide or point to information about how to run Flow locally.

  • We should generate a coverage report in the Jenkins build that is compatible with codecov so that we can see coverage information in codecov.

Open questions:

  • can Flow generate a report itself, or is an additional module needed (e.g. https://www.npmjs.com/package/flow-coverage-report)

  • can codecov handle both test and type coverage on the same files? If not, can we trick it into interpreting the flow coverage as applying to a separate directory tree?

Activity

Show:
Sean Flanigan
September 27, 2017, 12:54 AM
David Mason
September 27, 2017, 6:27 AM

I hadn't seen that yet. We may be blocked on this until flow merges that PR.

Sean Flanigan
September 29, 2017, 1:37 AM

Just means we can't integrate codecov. We shouldn't let that stop us from setting up Flow in the build.

David Mason
October 2, 2017, 11:41 PM

I agree. As long as devs can figure out where type-coverage is needed when a build fails, without too much head scratching, it is still a big improvement.

Assignee

Unassigned

Reporter

David Mason

Labels

Tested Version/s

None

Components

Priority

unspecified
Configure