-
Hi, We're using Poetry as part of our CI test matrix with different Python versions (currently 3.10 - 3.12) and operating systems (ubuntu, macos, windows). One of the main goals with this is to consistently verify that our project works on all of those. Today we had a minor hickup, where someone accidentally bumped the
This is obviously not the intended purpose of the test! Is there any way of preventing Poetry to switch to a different Python version? Or perhaps in the workflow setup to remove the pre-existing one? In any case, I need a solution that works cross-platform, ideally without having to add conditional steps for e.g. Windows vs. non-Windows or whatever. For reference, this is the relevant part of the workflow setup:
Originally, we had the "Set up Python" step before the Poetry one, but that recently led to problems when GitHub migrated the "macos-latest" label to macOS-15, where it would always end up using the default Python 3.13. Switching the steps at least solved that... I realize this question might be a bit off-topic in being more about GitHub workflows rather than Poetry itself, but I've been battling this for the past few hours and any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Poetry should fail if you run At the moment, you can probably just add a step that checks the version of the used Python (e.g. with |
Beta Was this translation helpful? Give feedback.
Poetry should fail if you run
poetry env use 3.10
and Python 3.10 is not allowed. However, it looks like it does not. I would classify this as bug.At the moment, you can probably just add a step that checks the version of the used Python (e.g. with
poetry run python --version
).