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?

Assignee

Unassigned

Reporter

David Mason

Labels

Tested Version/s

None

Components

Priority

unspecified
Configure