Page MenuHomePhabricator

Implement jenkins tests on labs/tools/stewardbots
Closed, ResolvedPublic

Description

Is it possible to have jenkins run tests on this project? Which tests, I don't know, but if you look at the contents we host there maybe you can figure out what would be better. Best regards.

Event Timeline

The phab clone of this repo, rTSTW says that Python >= 2.7 is required, so I think a phython linter would make sense? ;)

If it is python, you will want to use tox (a wrapper around virtualenv which let you run commands in a controlled env) https://www.mediawiki.org/wiki/Continuous_integration/Tutorials/Test_your_Python

For other languages, have a look at https://www.mediawiki.org/wiki/Continuous_integration/Entry_points

Once you have tox working, it is all about creating an entry for your project in integration/config.git zuul/layout.yaml . Something like:

- name: labs/tools/stewardbots:
   template:
     - name: tox-jessie

Since there's also HTML pages, tests on those would also be helpful if possible.

MarcoAurelio edited subscribers, added: Glaisher; removed: Stewards-and-global-tools.

Not sure I'll be able to get this done.

Change 275163 had a related patch set uploaded (by Glaisher):
Set up php parallel-lint

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

Change 275164 had a related patch set uploaded (by Glaisher):
Add composer-test for labs/tools/stewardbots

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

I think that would set up PHP testing. But I cannot help with Python tests unfortunately as I don't have the knowhow for py.

Change 275163 merged by MarcoAurelio:
Set up php parallel-lint

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

Change 275190 had a related patch set uploaded (by MarcoAurelio):
Continuous Integration config for labs/tools/stewardbots

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

Change 275164 merged by jenkins-bot:
Add composer-test for labs/tools/stewardbots

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

Change 275190 abandoned by MarcoAurelio:
Continuous Integration Python config for labs/tools/stewardbots

Reason:
Lost finding out how to do this. Better if somebody else could do it.

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

Change 275190 restored by MarcoAurelio:
Continuous Integration Python config for labs/tools/stewardbots

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

Change 284430 had a related patch set uploaded (by Hashar):
[labs/tools/stewardbots] experimental tox job

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

Change 284430 merged by jenkins-bot:
[labs/tools/stewardbots] experimental tox job

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

MarcoAurelio changed the task status from Open to Stalled.Apr 23 2016, 9:16 PM

Change 275190 abandoned by MarcoAurelio:
Continuous Integration Python config for labs/tools/stewardbots

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

MarcoAurelio lowered the priority of this task from Medium to Lowest.Jul 17 2016, 3:01 PM

Not working on this right now.

Is it possible to expand the tests to gate-and-submit (I think they work already, not sure) and postmerge?

Also, is it possible to add checks for HTML syntax (npm is?)

Thanks.

Okay, so, to summarize, we have PHP lint tests running. We still lack (IMO):

  • python checks
  • and maybe some other tests for HTML and other stuff

Our project hosts files on python and HTML so having tests for both would be useful I think.

The CI definition in integration/config.git zuul/layout.yaml is:

- name: labs/tools/stewardbots
  template:
    - name: composer-test55
  experimental:
    - tox-jessie

Namely when a patch is proposed we run composer update && composer test using Zend PHP 5.5. If one comments in Gerrit check experimental a job that runs tox is executed and report back, that is for Python testing. There is some description at https://www.mediawiki.org/wiki/Continuous_integration/Tutorials/Test_your_Python . Also look at my previous comment T128503#2077125

and maybe some other tests for HTML and other stuff

Not sure what you want to test on .html but if you have ideas, I don't mind assisting :]

Change 318521 had a related patch set uploaded (by Hashar):
Introduce tox flake8

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

hashar changed the task status from Stalled to Open.Oct 28 2016, 11:37 AM

https://gerrit.wikimedia.org/r/318521 is a first pass and should be a good base to build upon.  See commit message !

Change 318521 merged by jenkins-bot:
Introduce tox flake8

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

Maybe we shouldn't be using the mediawiki queue. Is there a labs queue? (Sometimes the mediawiki queue has a lot of work queued, using another queue for our tools might be good).

rTSTW-zuul-queue.png (237×488 px, 10 KB)

I've merged the above change. It always fails on tox, but I guess it's because the bot code is old.

Ahh the coupling with MediaWiki is due / related to T107529

MarcoAurelio claimed this task.

I think this is resolved for now. In case we need more tests, I'll open a new task.