Skip to content

Enable caching for uv#24

Merged
alarthast merged 2 commits into
mainfrom
aw/enable-uv-caching
Sep 17, 2025
Merged

Enable caching for uv#24
alarthast merged 2 commits into
mainfrom
aw/enable-uv-caching

Conversation

@alarthast

Copy link
Copy Markdown
Contributor

Requires #22 to be merged first as v6 of setup-python contains a bug fix that prevents itself from falling over when the cache directory is not used ("Change missing cache directory error to warning").

Enable caching for uv to speed up CI, and allow customisation of caching behaviour via the cache parameter as its possible values are already names of package managers.

See the commit message for more.

Slack thread for breadcrumbs: https://bennettoxford.slack.com/archives/C091K4T1F9D/p1758112450986209

Do not pass the `cache` parameter value to `setup-python` if it is not
one of: pip, pipenv, poetry.
This allows us to use `cache` to indicate preference for whether to
cache dependencies when using `uv` (which handles caching separately),
in a later commit.
We expect that doing so would speed up CI.
We do not change the default value of the `cache` input from 'pip', as
that would be a breaking change.
When we create setup-action v2, it might be worth altering the API.

@bloodearnest bloodearnest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, this is clean solution, good work

@bloodearnest bloodearnest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, this is clean solution, good work

Base automatically changed from dependabot/github_actions/actions/setup-python-6 to main September 17, 2025 15:01
@alarthast alarthast merged commit 5b3030f into main Sep 17, 2025
6 checks passed
@alarthast alarthast deleted the aw/enable-uv-caching branch September 17, 2025 15:01
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.

2 participants