Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit action to cache R additional_dependencies #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeancochrane
Copy link
Collaborator

@jeancochrane jeancochrane commented Jan 10, 2025

While working on a PR that uses additional_dependencies for a local R pre-commit hook, I noticed that workflow runs with a cache hit were failing with an error indicating that the dependencies were not installed, while non-cached runs were succeeding. After some debugging, I realized that pre-commit symlinks to the ~/.local/share/renv/cache folder for local hooks. This PR adds that directory to the workflow cache so that we can properly pull dependencies in case of cache hit.

See here for an example of a cached run that succeeded.

@jeancochrane jeancochrane marked this pull request as ready for review January 10, 2025 22:36
@jeancochrane jeancochrane requested a review from dfsnow January 10, 2025 22:36
Copy link
Member

@dfsnow dfsnow left a comment

Choose a reason for hiding this comment

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

Woof, this is a tricky one, thanks for debugging it!

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