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

Use pytest-split to distribute CI tests over multiple runners #369

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Feb 25, 2023

Description

To be squash-merged

@netlify
Copy link

netlify bot commented Feb 25, 2023

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit 8edcc53
🔍 Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/646a8efa5e5cce00088ab5b2
😎 Deploy Preview https://deploy-preview-369--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@maresb maresb changed the title Pytest split Use pytest-split to distribute CI tests over multiple runners Feb 25, 2023
@maresb maresb marked this pull request as ready for review February 25, 2023 22:30
@maresb maresb requested a review from a team as a code owner February 25, 2023 22:30
@maresb
Copy link
Contributor Author

maresb commented Feb 25, 2023

Here are the results of one complete run:
image

Copy link
Collaborator

@mariusvniekerk mariusvniekerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@@ -0,0 +1,120 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess this needs a gitignore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it's required, but it could probably live under tests/

@@ -61,6 +66,18 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ "3.8", "3.11" ]
pytest-split-group: [1, 2, 3]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can use non integer identifiers for these groups that would be better, since I have no idea what group 4 means

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add comments. Pytest-split tries to divide the tests into n groups labeled 1, ..., n which have approximately the same total runtime. So they have to be integers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runs are labeled like "test / ... (3, 5)" which is run number 3 out of 5.

@maresb maresb marked this pull request as draft February 26, 2023 10:58
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