Page MenuHomePhabricator

Move pywikibot tests from Travis to Github action
Open, HighPublic

Description

Travis CI was moved from travis-ci.org to travis-ci.com but these CI tests are no longer for free as it was recently. Monthly credits were consumed within few days for our tests

See also:
T285032
https://docs.travis-ci.com/user/billing-faq/#what-if-i-am-building-open-source
https://travis-ci.com/organizations/wikimedia/plan/usage
https://github.com/legoktm/pywikibot/tree/gh-actions

Event Timeline

Xqt triaged this task as High priority.Nov 24 2021, 8:11 AM

I have no access to https://travis-ci.com/organizations/wikimedia/plan/usage but how much will it cost to support our usual testing per month?

I have no access to https://travis-ci.com/organizations/wikimedia/plan/usage but how much will it cost to support our usual testing per month?

Looks like the url hasbeen changed. It is https://app.travis-ci.com/organizations/wikimedia/plan now.

The costs are 69$ p.m. for 1 concurrent job up to 249$ p.m with 5 concurren jobs (which we had previuously). There is a discount of 8.33 % for the annual fee.

btw the last fee was payed by @aezell in December 15, 2020 (1 month only)

I have sent a question to WMF rapid grants team whether it would be possible to cover testing by a grant:
https://meta.wikimedia.org/wiki/Grants:Project/Rapid

IMO travis-ci is mostly a dying platform, they're not responding to security issues or questions (https://travis-ci.community/t/questions-on-security-bulletin-repository-secrets-leak-to-prs/12094) and AIUI most of the original development team have been let go. Rather than paying them I think a better long-term option is to either get it working with GitHub Actions, or Wikimedia GitLab's setup.

I agree with @Legoktm that we should move the tests to either GitHub Action or to GitLab (if we move to that platform later) but it is indeed a long-term option because we have no tests there but a lot of environment tests are currently untested (including Python 3.10 tests). Setting up new tests also need new test accounts, Currently and since 5 months we only have Appveyor tests for some wikimedia sites on Windows environment and the deepcheck with Windows 3.6 on jenkins for wikipedia:test without login (Jenkins only supports 3.5 - 3.8). Maybe in meantime it would be helpful to have Travis tests until these tests were migrated. Most travis tests would run on a sponsored server if we could replenish our OSS credit balance.

Change 742924 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [test] Add a minmal CI github action worker

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

Change 742932 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] remove TRAVIS settings

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

Ignore my last comment. I've added a minimal github action which acts like our jenkins deeptest but uses Python 3.5 - 3.10 and (new!) pypy3. Let's start with that.
https://github.com/xqt/pwb/actions/runs/1525189120

Change 742932 merged by jenkins-bot:

[pywikibot/core@master] [tests] remove TRAVIS settings

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

Change 742924 merged by jenkins-bot:

[pywikibot/core@master] [test] Add a minimal CI github action worker

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

Change 743357 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] expand github actions test matrix

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

Change 743357 merged by jenkins-bot:

[pywikibot/core@master] [tests] expand github actions test matrix

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

Rubin16 renamed this task from Move pywikibot tests from Tavis to Github action to Move pywikibot tests from Travis to Github action.Dec 4 2021, 7:43 AM

Change 743595 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Add Python 3.11 to test matrix

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

Change 743595 merged by jenkins-bot:

[pywikibot/core@master] [tests] Add Python 3.11 to test matrix

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

Change 743686 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Add test environments to github actions

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

Change 743686 merged by jenkins-bot:

[pywikibot/core@master] [tests] Add test environments to github actions

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

Change 745195 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Add wpbeta and wsbeta to test matrix

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

I've migrated most tests from tests to github but I have no access to the Pywikibot-test* user accounts. Their passwords must be added as github secrets:
https://github.com/wikimedia/pywikibot/settings/secrets/actions

Who can add them?
see Travis settings:

image.png (628×1 px, 87 KB)

Hi @Xqt,
Do you have access to pywikibot account on toolforge? (according to https://admin.toolforge.org/tool/pywikibot you do)

The password for Pywikibot-test is stored in a file named passwd in the home directory of that account.

Change 745195 merged by jenkins-bot:

[pywikibot/core@master] [tests] Add wpbeta and wsbeta to test matrix

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

Hi @Xqt,
Do you have access to pywikibot account on toolforge? (according to https://admin.toolforge.org/tool/pywikibot you do)

Thank you @Dalba. Found it now.

Change 752676 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Enable logged in tests with github actions

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

Change 752676 merged by Xqt:

[pywikibot/core@master] [tests] Enable logged in tests with github actions

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