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:

Former user 2 October 2017 at 23:41

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.

Sean Flanigan 29 September 2017 at 01:37

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

Former user 27 September 2017 at 06:27

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

Sean Flanigan 27 September 2017 at 00:54

Details

Assignee

Reporter

Labels

Tested Version/s

Components

Priority

More fields

Created 26 September 2017 at 23:15
Updated 2 October 2017 at 23:44

Flag notifications