pytest-split icon indicating copy to clipboard operation
pytest-split copied to clipboard

Fetch group and splits from CircleCI environment variables

Open thedrow opened this issue 5 years ago • 3 comments

Since we already have the group number and number of groups in our environment variables on some CI environments we can simply fetch them.

I'm not sure this is the exact behavior you want. Maybe it be better to provide an extension hook and let other plugins cooperate with your plugin.

thedrow avatar Apr 01 '20 09:04 thedrow

I haven't used CircleCI myself but this seems convenient indeed. However, I'm a bit hesitant about introducing some CI provider specific logic in a pytest-plugin. Wouldn't this be problematic if the CI workflow contains some additional parallel steps which are not testing related? For example if the build is split to 6 parallel jobs, from which 5 run pytest and the 1 runs e.g. linting related things?

It seems that CircleCI supports matrix configurations. Would it make sense to specify the --group variable with that?

jerry-git avatar Apr 02 '20 05:04 jerry-git

I don't know, that's what people used to do before.

Maybe we should provide an extension hook instead.

thedrow avatar Apr 02 '20 06:04 thedrow

Yes indeed, a hook or similar might be the most flexible solution. If you have a solution in mind, feel free to create a patch (or update this one). This could be something I might look into myself as well at some point.

jerry-git avatar Apr 03 '20 06:04 jerry-git