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

⚡ Automatically use pytest-xdist to run tests in parallel #3574

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

ff137
Copy link
Contributor

@ff137 ff137 commented Mar 11, 2025

pytest-xdist already exists as a dev dependency, but it's not configured to be used automatically.

So, this PR adds -n auto to the pytest.ini_options, so that running pytest will automatically try use as many parallel instances as it can. This should also configure it to be used in the PR tests GitHub action

On my machine, this speeds up tests from ~6m30s to ~1m30s

Edit: Ah, I see the GitHub action is already configured to run with -n auto

@ff137
Copy link
Contributor Author

ff137 commented Mar 11, 2025

This is technically not needed, because a dev can manually add -n auto if they want it. But I didn't know that pytest-xdist was available, and would wait the ~6 minutes for local tests to run.

So, it's mainly just to speed things up automatically, for the other devs who also didn't know about it 😄

@swcurran swcurran requested review from a team March 11, 2025 18:28
@ff137 ff137 changed the title ⚡ Use pytest-xdist to run tests in parallel ⚡ Automatically use pytest-xdist to run tests in parallel Mar 11, 2025
@jamshale jamshale merged commit 093d206 into openwallet-foundation:main Mar 11, 2025
11 checks passed
ff137 added a commit to didx-xyz/acapy that referenced this pull request Mar 14, 2025
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.

3 participants