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

Duplicate caching in R-CMD-check and test-coverage actions #591

Open
milanmlft opened this issue Jun 4, 2024 · 0 comments
Open

Duplicate caching in R-CMD-check and test-coverage actions #591

milanmlft opened this issue Jun 4, 2024 · 0 comments

Comments

@milanmlft
Copy link
Contributor

Hi sandpaper devs!

I noticed while working on a fork of sandpaper that the CI is producing quite a lot of caches on the GitHub Action runners. Upon further inspection, I think this is due because there are 2 caching steps happening in the R-CMD-check and test-coverage actions:

  1. The custom "Restore {renv} cache" step
  2. The "Setup dependencies" step which calls setup-r-dependencies from r-lib

The problem is that setup-r-dependencies does its own caching by default.

I think they're meant to cache pretty much the same thing (R dependencies of sandpaper), though I'm not sure why the renv caches are typically bigger. In any case I think you only need one of them and having both can eat up quite a lot of caching storage space (might want to check this for the Carpentries organisation).

I'd suggest removing the Restore {renv} cache step (and the dependent Prime {renv} Cache) and let setup-r-dependencies handle the caching. That would also reduce the amount of code to maintain for the sandpaper` devs 😉

Happy to create a PR for this!

milanmlft added a commit to LearnToDiscover/sandpaper that referenced this issue Jun 4, 2024
`r-lib/actions/setup-r-dependencies` already takes care of caching
See also carpentries#591
milanmlft added a commit to LearnToDiscover/sandpaper that referenced this issue Jun 6, 2024
* Avoid duplicate caching

`r-lib/actions/setup-r-dependencies` already takes care of caching
See also carpentries#591

* Further simplify the `R-CMD-check` action

* Upgrade `actions/checkout` to `v4`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant