Page MenuHomePhabricator

Jenkins: Set up lint and phpunit jobs for cdb repo
Closed, ResolvedPublic

Description

The cdb code in mw core was recently moved out to a separate library. The "cdb" repo should have:

  • php linter
  • phpunit tests
  • composer validate

Version: unspecified
Severity: major

Details

Reference
bz73541

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:50 AM
bzimport set Reference to bz73541.
bzimport added a subscriber: Unknown Object (MLST).

Change 174054 had a related patch set uploaded by Legoktm:
Add jobs for cdb

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

Since that project has some PHPUnit based tests, you might want to add the job '{name}-phpunit' to it. It uses the PHPUnit version from integration/phpunit.
You will need to add to the repo a phpunit.xml.dist file, look at ParserHooks, Semantic* or Wikibase extensions for examples :)

Change 174080 had a related patch set uploaded by Hashar:
Add 'composer test' to run PHPUnit

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

Change 175444 had a related patch set uploaded (by Krinkle):
build: Set up phplint and phpunit

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

Patch-For-Review

This is on hold while we figure out how to use composer, specially we need to determine a set of conventions that are used on all repositories which make it easy for developers to run tests and for Jenkins jobs to tweak the test commands settings.

hashar moved this task from In-progress to Done on the Continuous-Integration-Infrastructure board.

This has been resolved. We have a Jenkins job template to run composer test and the cdb repo invokes parallel PHP linting + PHPUnit.