Skip to content

ci: add uv virtual environment cache to setup-uv-project action#559

Open
davidberenstein1957 wants to merge 3 commits intomainfrom
feat/cache-uv-venv
Open

ci: add uv virtual environment cache to setup-uv-project action#559
davidberenstein1957 wants to merge 3 commits intomainfrom
feat/cache-uv-venv

Conversation

@davidberenstein1957
Copy link
Member

Description

Added some caching for UV :)

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

uses: actions/cache@v5
with:
path: .venv
key: uv-venv-${{ runner.os }}-${{ matrix.python-version || '3.11' }}-${{ hashFiles('uv.lock', 'pyproject.toml') }}
Copy link

Choose a reason for hiding this comment

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

Cache key references gitignored uv.lock file

Medium Severity

The uv.lock file is listed in .gitignore, so it will never be present in the repository checkout. hashFiles('uv.lock', 'pyproject.toml') silently ignores missing files, so the cache key effectively only hashes pyproject.toml. This means the uv.lock reference is a no-op, and the cache won't invalidate when it otherwise would if the lock file were tracked. The same issue applies to the restore-keys line.

Fix in Cursor Fix in Web

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.

1 participant