Skip to content

Add cache-suffix to setup-uv actions across CI workflows#24

Merged
tsvikas merged 1 commit intomainfrom
claude/cache-suffix-dependency-groups-pe3m3
Apr 12, 2026
Merged

Add cache-suffix to setup-uv actions across CI workflows#24
tsvikas merged 1 commit intomainfrom
claude/cache-suffix-dependency-groups-pe3m3

Conversation

@tsvikas
Copy link
Copy Markdown
Owner

@tsvikas tsvikas commented Apr 9, 2026

Summary

This PR adds cache-suffix parameters to all astral-sh/setup-uv action invocations across the CI workflow files to enable job-specific caching strategies.

Key Changes

  • ci.yml: Added cache suffixes to three jobs:

    • mypy job: cache-suffix: mypy
    • deps job: cache-suffix: deps
    • pylint job: cache-suffix: pylint
  • deps-update.yml: Added cache suffix to the dependency update job:

    • cache-suffix: deps-update
  • weekly-ci.yml: Added cache suffix to the pip-audit job:

    • cache-suffix: pip-audit

Implementation Details

Each setup-uv action now includes a with: block specifying a unique cache-suffix value that corresponds to the job's purpose. This allows GitHub Actions to maintain separate caches for each job type, preventing cache conflicts and improving cache hit rates by ensuring that job-specific dependencies are cached independently.

https://claude.ai/code/session_01No4QEgz6Vc6zXDYWNnnYGY

Jobs with different `uv sync` dependency groups (e.g., `--group typing
--group test` vs `--all-groups`) computed identical cache keys since
GitHub Actions caches are immutable (first-writer-wins). Add distinct
`cache-suffix` values to each non-matrix job: mypy, deps, pylint,
pip-audit, and deps-update.

https://claude.ai/code/session_01No4QEgz6Vc6zXDYWNnnYGY
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@tsvikas tsvikas merged commit ba922ab into main Apr 12, 2026
5 checks passed
@tsvikas tsvikas deleted the claude/cache-suffix-dependency-groups-pe3m3 branch April 12, 2026 10:50
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