Topic on Talk:Continuous integration/Codehealth Pipeline

Allow disabling of coverage reports

4
Jdlrobson (talkcontribs)

The patch on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Popups/+/710123 claims that 0% code coverage of new lines is added, but this doesn't seem aware of the unit testing framework that Popups uses. It even suggests writing JavaScript unit tests for JavaScript unit tests!

Is it possible to add some kind of local sonar configuration to wire this up correctly or to disable it?

This caused some unnecessary and avoidable confusion during code review.

KHarlan (WMF) (talkcontribs)

@Jdlrobson sorry for the confusion. The best solution would be to update https://gerrit.wikimedia.org/r/plugins/gitiles/integration/config/+/refs/heads/master/jjb/mediawiki.yaml#794 with a npm test command that we can agree will be used in all repositories using node-qunit (not many, AFAIK): WikibaseMediaInfo, QuickSurveys (?), Popups, and MobileFrontend. `npm run coverage` sounds fine to me. And that command needs to output an `lcov.info` file in `coverage/lcov.info` for SonarQube to pick it up during analysis. How does that sound?

Jdlrobson (talkcontribs)
Jdlrobson (talkcontribs)

Note, our code coverage is generated by "npm run coverage", and "npm test" not "npm run test:unit" as coverage reports slow down the execution of unit tests.

Reply to "Allow disabling of coverage reports"