Travis and Appveyor builds take cca 4 hours. Let's find out, how we could make them faster!
What Travis suggests:
Travis and Appveyor builds take cca 4 hours. Let's find out, how we could make them faster!
What Travis suggests:
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T152961 Improve tests suite | |||
Resolved | Xqt | T186323 Travis and Appveyor: Major improvement to test time | |||
Declined | jayvdb | T106070 Travis python package caching | |||
Resolved | Xqt | T191188 error: Could not find suitable distribution for Requirement.parse | |||
Declined | Xqt | T191632 l10n_tests should run only once for every committed patch | |||
Open | None | T244082 tests.collector does ignore disabled_test_modules in some cases | |||
Resolved | Xqt | T242081 Pywikibot fails to access Wikidata due to high maxlag lately |
Here is an idea (although I don't know how much it can help):
When a commit only affects a script, there is no need to run all tests, just the related test module for that script. The other parts have already been tested in previous commits. This should be safe because the pywikibot directory does not depend on scripts, and scripts are (should be) independent from each-other.
It seems ok to me, per T60942 no library file calls a script, but scripts call others sometimes.
Good idea but I've no glue how to set up tests to only run a subset of it with scripts changes
I changed the Travis settings a bit to enable more concurrent jobs and cancel jobs when a new patch was deployed; this will shorten tests time a lot. I also cancelled some jobs but they can be restarted if necessary. Unfortunately I cannot do such administrative things on apveyor.
As result of the settings changes one test in Travis needs one hour now vs. two hours before.
Excellent!
PS: @Ladsgroup has got an access to the current Appveyor account, @jayvdb has got an access to the Wikimedia Appveyor account. To solve the issue, there are two options:
Change 463735 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] Set fast_finish: true
Change 463735 merged by jenkins-bot:
[pywikibot/core@master] [tests] Set fast_finish: true
We need a lot of time for testing Python 2.7 which is 14 minutes at Travis and 52 minutes at Appveyor in total
@Ladsgroup: could you please give access to Appveyer project to @Dvorapa or me to allow settings to be changed.
Change 567337 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] decrease testing time
@Xqt How about https://ci.appveyor.com/project/pywikibot/pywikibot ? (you should be able to access it using your GitHub account)
(also sorry for the noise, I changed e-mail address for Pywikibot-oauth from jayvdb@gmail.com to tools.pywikibot@tools.wmflabs.org)
Sorry for that, I forgot to communicate that I tried it several times before but couldn't find the settings, it's really hard to find. Apparently (and after googling a couple of times) I need to do some black magic to get @Dvorapa there. @Dvorapa Can you give me your email address so I add you?
Change 567337 abandoned by Xqt:
[tests] decrease testing time
Reason:
After rolling builds was set
Travis needed two hours in total because 5 tests are running simultaneously (see my comment dated Sep 27 2018, 01:48). Auto cancel is activated.
Appveyor Needs 3,5 - 7 hours per test but test builds does not block new test anymore because rolling builds is activated.
After dropping Python 2, Travis will be 20 minutes faster and Appveyer will be 1 hour faster.
This is ok for me currently. Do you have other ideas to improve tests time?
Above we discussed caching, tests performance issues, currently also some maxlag and login issues making tests much more longer or even timeouting after 50min
I am also fine with keeping this open. Caching was removed several months ago because there where more problems with it than it saved test time. Other issues like timeout and login problems have their own task. Probably we can make them subtasks.
Change 569314 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] Ignore L10N tests for pywikibot-core repository
Change 569314 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] Ignore L10N tests for pywikibot-core repository
Change 735657 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] [tests] Improvement to test time at appveyor
Change 735657 merged by jenkins-bot:
[pywikibot/core@master] [tests] Improvement to test time at appveyor
Change 743567 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] [tests] always use TestTimerMixin with TestCaseBase
Change 743567 merged by jenkins-bot:
[pywikibot/core@master] [tests] always use TestTimerMixin with TestCaseBase
Moving from Travis to Github actions improves test times a lot. Github needs less then one hour whereas travis needs 5 hours. Closing then.