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

CI: omit repeated slow tests #1131

Merged
merged 3 commits into from Apr 23, 2023

Conversation

dairiki
Copy link
Contributor

@dairiki dairiki commented Apr 16, 2023

There are a few of our pytest tests that are particularly slow (especially on the macOS and Windows runners).

We run several testenvs on each runner:

  • pyXX: the default set of tests
  • pyXX-mistune0: run with a mistune<1.0 pin to test under mistune 0.x
  • pyXX-notuils: discovery of external utilities (e.g. ffmpeg, git) via PATH disabled to test that things degrade gracefully when to utitilies are not available (currently only run on the python 3.11 runners)
  • pyXX-pytz: run with pytz installed (currently only run on the python 3.11 runners)
  • pyXX-tzdata: run with tzdata explicitly installed (currently only run on the python 3.11 runners)

The slow tests are slow because due to internet access, or spawning of new processes. We don't really get any benefit by repeating them on all of the above testenv variants.

This PR adds a slowtest pytest marker and applies it to those particularly slow tests which may be safely skipped in the variant testenvs. Tox.ini is adjusted so that those tests are skipped for all but the main pyXX testenvs.

This appears to speed the macOS job by a minute or more per testenv.

Issue(s) Resolved

CI tests are very slow

Here we mark a few particularly slow tests, and edit tox.ini so that
these tests are not run (by default) in the "variant" testenvs
(e.g. py311-tzdata).

The tests marked with `slowtest` are particularly slow on the
macOS (and probably the Windows runners). Omitting them saves about
a minute per testenv in those environments.
There have been occasional CI test failures (I think) do to this
wait being too short.
@yagebu yagebu merged commit 0a6df01 into lektor:master Apr 23, 2023
15 checks passed
@dairiki dairiki deleted the fix.skip-repeated-slow-tests branch April 23, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants