Use faster ItsDrike/setup-poetry in favor of HassanAbouelela/actions/setup-python #487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates all workflows that require dependency installation with poetry to use
ItsDrike/setup-poetry
which is significantly faster to the currentHassanAbouelela/actions/setup-python
.For an in-depth description of what's changed, feel free to check py-mine/mcproto#12, which was a PR with same goal (moving from HassanAbouelela/actions/setup-python to ItsDrike/setup-poetry). It's description includes a performance analysis, comparing the actual times action runs took between these two, and mentions some caveats that switch has.
For a quick overview, here's the important things:
Improvements this switch brings us
ItsDrike/setup-poetry
action, ahead of time, not as post hooks, meaning whenever dependency installation step succeeds, caches will be created, even if the action fails in some step later on.Extra enhancements
HassanAbouelela/actions/setup-python
was also caching pre-commit environments (at least for linux where caching actually worked), which theItsDrike/setup-poetry
is not doing. For that reason, an additional step was added specifically to cache the pre-commit environment in the validation workflow.Note
As this change will now be installing poetry globally, rather than as one of the project's dependencies, making it a part of the project's venv binaries, to make tox work with poetry installations in the CI, adding
poetry
dependency to theworkflow-tox
group was necessary.However this doesn't affect end users nor developers, as this dependency group is only used within the workflows.