Page MenuHomePhabricator

Setup linting / phpunit tests for wikimedia/wikimania-scholarships
Closed, ResolvedPublic

Description

New project, not MediaWiki-related at all.

Mostly PHP/JS, so linting would be nice. Also have some rudimentary PHPUnit tests, so running those would be nice too.

Normal gate-and-submit workflow is dandy.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz57572

Event Timeline

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

Need to slightly refactor Jenkins Job Builder configuration to provide basic macro that will make that easy.

Change 97726 had a related patch set uploaded by Hashar:
phpunit job + wikimedia/wikimania-scholarships

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

Change 97726 merged by jenkins-bot:
phpunit job + wikimedia/wikimania-scholarships

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

Change 97727 had a related patch set uploaded by Hashar:
triggers for wikimedia/wikimania-scholarships

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

Change 97727 merged by jenkins-bot:
triggers for wikimedia/wikimania-scholarships

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

Change 97728 had a related patch set uploaded by Hashar:
Jenkins job validation (DO NOT SUBMIT)

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

Change 97729 had a related patch set uploaded by Hashar:
phpunit-junit builder missed full path to phpunit

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

Change 97729 merged by jenkins-bot:
phpunit-junit builder missed full path to phpunit

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

Change 97728 abandoned by Hashar:
Jenkins job validation (DO NOT SUBMIT)

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

The php jobs have been deployed. Now need to have the project pass jshint, thus you get some changes to review:

https://gerrit.wikimedia.org/r/97730 configure jshint
https://gerrit.wikimedia.org/r/97731 fix jshint issues

jshint fixes are merged. \o/

I think it would be nice to add phpcs to this project too. I'd actually like phpcs lenient to be voting on this code I think but only if the vendor directory can be excluded. I don't want to have folks be tempted to edit code that we pull in via composer.

Chad also fixed a gerrit permissions problem that was keeping the "submit" part of "gate-and-submit" from working.

Change 97728 restored by Hashar:
Jenkins job validation (DO NOT SUBMIT)

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

Change 98501 had a related patch set uploaded by Hashar:
wikimedia-wikimania-scholarships-jslint now voting

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

Change 98501 merged by jenkins-bot:
wikimedia-wikimania-scholarships-jslint now voting

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

Change 97728 abandoned by Hashar:
Jenkins job validation (DO NOT SUBMIT)

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

It would be nice if we could add a lint job that validates that the data/i18n/*.json files are valid json. I don't know if jshint could be used to do this validation or if it would require some other lint program.

(In reply to comment #19)

It would be nice if we could add a lint job that validates that the
data/i18n/*.json files are valid json. I don't know if jshint could be used
to do this validation or if it would require some other lint program.

That is now bug 58279 "add a JSON linter for CI"

I think all of the work for this was completed when Antoine closed bug 58279.