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.
Description
Details
Related Objects
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
Change 275163 had a related patch set uploaded (by Glaisher):
Set up php parallel-lint
Change 275164 had a related patch set uploaded (by Glaisher):
Add composer-test for labs/tools/stewardbots
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 275190 had a related patch set uploaded (by MarcoAurelio):
Continuous Integration config for labs/tools/stewardbots
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.
Change 275190 restored by MarcoAurelio:
Continuous Integration Python config for labs/tools/stewardbots
Change 284430 had a related patch set uploaded (by Hashar):
[labs/tools/stewardbots] experimental tox job
Change 275190 abandoned by MarcoAurelio:
Continuous Integration Python config for labs/tools/stewardbots
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 :]
https://gerrit.wikimedia.org/r/318521 is a first pass and should be a good base to build upon. See commit message !
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).
I've merged the above change. It always fails on tox, but I guess it's because the bot code is old.