Try to use pytest-xdist for test suite - #1917
pat-schmitt wants to merge 1 commit into
Conversation
|
The runners got 4 CPUs even. |
I don't think this is true (or rather if it is, we need to fix it), but many tests rely on a small sample of data created either in pytest fixtures or test classes init. It's too bad though, this would be a massive help... |
|
What about using Here is also an example for writing to disk. |
|
Things created during init should not be a problem for xdist, since it really should be running init before running any tests. |
While trying to reduce the runtime of the test suite on GitHub Actions, I came across pytest-xdist. The idea is to distribute the tests across all available CPUs. On GitHub Actions you get two CPUs, meaning there is potential to halve the test run times.
However, for this to work, we need to use locking correctly for all files involved in the tests, which is not currently the case. This PR is meant to investigate whether we are able to make use of this.
@TimoRoth do you know anything about this, or do you have an idea how we can make this work?
whats-new.rst