Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests and set up CI action #7

Open
2 of 5 tasks
elsiehupp opened this issue Mar 27, 2022 · 7 comments
Open
2 of 5 tasks

Run tests and set up CI action #7

elsiehupp opened this issue Mar 27, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@elsiehupp
Copy link
Member

elsiehupp commented Mar 27, 2022

Right now tests don't run automatically, and there aren't any instructions on how to run them. The following should happen:

  • We should fix any outstanding problems that cause the tests to fail.
  • We should add instructions on how to run tests to the main README.
  • Once the branch python3 passes the tests, we should set up an automated-testing Action so that tests passing is a prerequisite for merges to that branch.

Additionally, we should do the following with the tests:

  • We should break the single source document into test modules corresponding to the modules in the main package itself.
  • We should probably set up a MediaWiki test server somewhere (since for some reason the WikiTeam MediaWiki returns an invalid result that causes tests to fail).
@robkam

This comment was marked as resolved.

@yzqzss
Copy link

yzqzss commented Jan 3, 2023

I'm installing various versions of MediaWiki.
From 1.16.5(released on 2011-05-05) to 1.39.X(current LTS release).

Currently, these versions are already installed:

I will install 1.27 LTS, 1.31 LTS, 1.35 LTS and 1.39 LTS soon.

For testing Unicode and XML compatibility, some wikis's language are set to Chinese, and some sites have special characters and Emoji in the title.

Could someone help me insert test data into wikis once set up? Upload some articles and files, the title and content should be as weird as possible, xD.

We can also install wikis with different "features" like http 301 https, SSL expired, Special:Export disabled, some APIs disabled, wiki with WAF, etc.

@elsiehupp
Copy link
Member Author

I had originally intended the prepare-for-publication branch to serve this purpose, and I did make some progress on getting that branch to pass the tests, but I got sidetracked on other things, and I got a bit overwhelmed, so that branch is increasingly out of date.

One of the other things I was working on with the prepare-for-publication branch was switching from using the same config dictionary for every function call and instead using typed parameters, with mypy type checking to help with debugging.

While I do still think that mypy type checking would be helpful, I was trying to do way too much all at once, which is probably a big part of why I got overwhelmed and stalled in the process...

As far as salvaging the work I did on the prepare-for-publication branch goes, one place to start could be copying over the tests themselves, since the issue was partially getting the tests themselves to work, with the application code not being the main problem.

It would probably also help to create one or more additional branches, so that any salvageable changes could be brought over piecemeal.

How does this sound? I can try and take a stab at it myself, but as I've mentioned I'm super not on top of things (hence why I'm glad you all have been working together so well without me).

@WolfgangFahl
Copy link

See https://github.com/WolfgangFahl/pymediawikidocker where this is fully automated and where the extensions to be used may be specified while at so usecases revolving around problems with extensions might be tested.

See https://wiki.bitplan.com/index.php/Pymediawikidocker#Examples for examples

See https://github.com/WolfgangFahl/pymediawikidocker/actions for the CI usage
Defined in https://github.com/WolfgangFahl/pymediawikidocker/blob/main/.github/workflows/build.yml
Which simply uses

scripts/install
scripts/test

as the CI commands - which starts python commands to run the whole show
using the excellent https://github.com/gabrieldemarmiesse/python-on-whales library

@elsiehupp
Copy link
Member Author

Rereading the initial checklist, it looks like the main thing left to do is adding instructions on how to run the tests locally. Is there anything else I'm missing?

@robkam
Copy link
Member

robkam commented Jun 13, 2024

Save The Web Project's MediaWiki test sites (http://group0.mediawiki.demo.save-web.org/ and so on) are down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

4 participants