Page MenuHomePhabricator

Generate PHP code coverage via unit tests only, not integration tests
Closed, ResolvedPublic

Description

For MediaWiki core, we generate code coverage reports via unit tests only (the tests in tests/phpunit/unit.

This task proposes to do the same thing for extensions that are in the codehealth pipeline.

As a downside, every extension's code coverage report in SonarQube will drop significantly.

As a plus:

  • We won't have to install MediaWiki or clone Zuul dependencies in order to generate the PHP coverage report; we'll just need composer install and npm install. I think this could save a few minutes per build and free up CI resources
  • We'll help encourage writing more unit tests for extensions that are in the codehealth pipeline

Event Timeline

kostajh created this task.Aug 13 2019, 3:23 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 13 2019, 3:23 PM
kostajh claimed this task.Aug 19 2019, 2:20 PM

Change 530866 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[integration/config@master] [quibble-coverage] Generate coverage with unit tests in codehealth

https://gerrit.wikimedia.org/r/530866

Change 530867 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[integration/config@master] jjb: [mwext-codehealth*] Use quibble-coverage 0.0.35

https://gerrit.wikimedia.org/r/530867

Change 530866 merged by jenkins-bot:
[integration/config@master] [quibble-coverage] Generate coverage with unit tests in codehealth

https://gerrit.wikimedia.org/r/530866

Mentioned in SAL (#wikimedia-releng) [2019-08-21T08:41:08Z] <hashar> Build docker-registry.discovery.wmnet/releng/quibble-coverage:0.0.34-4 # T230423

Change 530867 merged by jenkins-bot:
[integration/config@master] jjb: [mwext-codehealth*] Use quibble-coverage 0.0.34-4

https://gerrit.wikimedia.org/r/530867

Change 531445 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[integration/config@master] [quibble-coverage] Fix mwext-phpunit-coverage command

https://gerrit.wikimedia.org/r/531445

Change 531446 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[integration/config@master] jjb [mwext-codehealth*] Bump jobs to use quibble-coverage:0.0.34-5

https://gerrit.wikimedia.org/r/531446

Change 531445 merged by jenkins-bot:
[integration/config@master] [quibble-coverage] Fix mwext-phpunit-coverage command

https://gerrit.wikimedia.org/r/531445

Change 531446 merged by jenkins-bot:
[integration/config@master] jjb [mwext-codehealth*] Bump jobs to use quibble-coverage:0.0.34-5

https://gerrit.wikimedia.org/r/531446

kostajh moved this task from Backlog to Done on the Code-Health-Metrics board.Aug 22 2019, 11:51 AM
kostajh closed this task as Resolved.Aug 26 2019, 2:06 PM