Back to Daily Feed 
Cache-Friendly `uvx` in GitHub Actions: A Practical Guide
Worth Reading
Originally published on Simon Willison's Weblog by Simon Willison
View Original Article
Share this article:
Summary & Key Takeaways
uvxcan be made cache-friendly in GitHub Actions by settingUV_EXCLUDE_NEWER.- This environment variable pins tool versions to a specific date, improving cache hit rates.
- The date can be included in the GitHub Actions cache key to bust the cache when needed.
- The primary goal is to avoid re-downloading Python tools and their dependencies from PyPI on every workflow run.
- An existing issue requests
setup-uvto default to caching rather than purging wheels.
Our Commentary
I've seen so many CI pipelines struggle with dependency resolution and caching. This UV_EXCLUDE_NEWER trick for uvx is genuinely smart. It's a simple, effective pattern that I think could be adapted for other package managers too. We're always looking for ways to shave seconds off builds, and this is a solid win for developer experience.
View Original Article
Share this article: