Page MenuHomePhabricator

For MediaWiki extensions, merge composer test into mwext-textextension / mediawiki-extensions jobs
Closed, ResolvedPublic

Description

Most MediaWiki repositories now have a composer test. The PHPUnit tests already install the composer dev dependencies and thus we should be able to run composer test directly in the job that runs the PHPUnit tests.

Benefits:

  • we stop triggering the composer tests extra jobs that consume instances
  • if lint/style fails, the PHPUnit jobs are not run at all and feedback is given faster

Since some MediaWiki repositories might lack a composer.json or a test entry point, we would have to take that in account.

Event Timeline

hashar triaged this task as Medium priority.

Change 352128 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Allow composer-test to run in different directory

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

Change 352160 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] mwext-testextension now runs composer test

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

There are a few extensions having a composer.json file but that lacks a scripts.test entry. With the testextension job now invoking composer test that would fail.

Note: some extensions trigger the mediawiki-extensions-* jobs that do not run composer test so they are unaffected.

List:

$ (for f in `ls */composer.json`; do echo -n "$f: "; jq -c '.scripts.test' "$f"; done;)|grep 'null'
BlueSpiceExtendedSearch/composer.json: null
BlueSpiceSMWConnector/composer.json: null
CirrusSearch/composer.json: null
DataTransfer/composer.json: null
FundraisingEmailUnsubscribe/composer.json: null
GoogleAnalyticsTopPages/composer.json: null
GoogleGeocode/composer.json: null
Html2Wiki/composer.json: null
LinkedWiki/composer.json: null
NotebookViewer/composer.json: null
NumerAlpha/composer.json: null
OOUIPlayground/composer.json: null
OpenIDConnect/composer.json: null
PipeEscape/composer.json: null
PubSubHubbub/composer.json: null
reCaptcha/composer.json: null
SecureSessions/composer.json: null
SemanticHighcharts/composer.json: null
SemanticSifter/composer.json: null
SideBarMenu/composer.json: null
SwiftMailer/composer.json: null
UserFunctions/composer.json: null
WebPlatformAuth/composer.json: null
Wikidata/composer.json: null
WindowsAzureSDK/composer.json: null

For all extensions from above now exists patch sets, also for skins Refreshed and Material

Change 352128 merged by jenkins-bot:
[integration/config@master] Allow composer-test to run in different directory

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

Mentioned in SAL (#wikimedia-releng) [2017-05-10T08:04:57Z] <hashar> merging 'composer test' into mwext-testextension-* jobs https://gerrit.wikimedia.org/r/#/c/352160/ - T161895

Change 352160 merged by jenkins-bot:
[integration/config@master] mwext-testextension now runs composer test

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

I have forgot to merge composer into the mediawiki-extensions-* jobs.

Change 356047 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Run composer test from mediawiki-extensions jobs

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

Change 356047 merged by jenkins-bot:
[integration/config@master] Run composer test from mediawiki-extensions jobs

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

Change 357209 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Run composer test from mediawiki-extensions jobs

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

Change 357209 merged by jenkins-bot:
[integration/config@master] Run composer test from mediawiki-extensions jobs

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

For mediawiki-extensions jobs: after MediaWiki has been installed, the job cd to the extension and composer install && composer test.

Solved via https://gerrit.wikimedia.org/r/#/c/357209/ + a JJB patch https://review.openstack.org/#/c/471030/