You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Cypress for E2E testing and pnpm for managing dependencies. In the CI, I use actions/setup-node with cache: 'pnpm', but when the CI runs pnpm install, the Cypress binary ends up in ~/.cache/Cypress, which is outside of the pnpm store directory, so it doesn't get cached. I'd like to be able to cache this additional path without having to add a separate actions/cache job or moving the Cypress cache folder.
Indeed, if I add a separate job, I end up with a separate cache key even though the two caches depend on the same file, pnpm-lock.yaml. This means that I then have to be very careful to always call the two jobs together in every CI job. If I don't, I can end up with one cache but not the other (when one job succeeds but not the other), which is bad: if the pnpm store is cached but not the Cypress binaries, pnpm install doesn't run the post-install scripts, the Cypress binaries don't get downloaded, and my Cypress tests fail.
Changing the Cypress cache folder, for instance to put it inside the pnpm store directory, is not ideal either, as it's done via an env var which has to be declared when both installing and running Cypress. And again, I have to remember to set the env var in every job, which adds complexity to my CI workflows.
Alternatively, instead of having a dedicated key for specifying additional cache paths, perhaps it would be worth introducing a more general way to extend the underlying actions/cache configuration. 🤷
The text was updated successfully, but these errors were encountered:
Hello @axelboc. Thank you for your feature request. We're not planing to implement extra field to provide caching paths. According to ADR the cache logic should cover basic use cases. If you need more flexible customization you should use actions/cache.
Description:
I'd like to be able to pass more paths to
actions/cache
in addition to the package manager's store directory. Something like this:Justification:
I use Cypress for E2E testing and pnpm for managing dependencies. In the CI, I use
actions/setup-node
withcache: 'pnpm'
, but when the CI runspnpm install
, the Cypress binary ends up in~/.cache/Cypress
, which is outside of the pnpm store directory, so it doesn't get cached. I'd like to be able to cache this additional path without having to add a separateactions/cache
job or moving the Cypress cache folder.Indeed, if I add a separate job, I end up with a separate cache key even though the two caches depend on the same file,
pnpm-lock.yaml
. This means that I then have to be very careful to always call the two jobs together in every CI job. If I don't, I can end up with one cache but not the other (when one job succeeds but not the other), which is bad: if the pnpm store is cached but not the Cypress binaries,pnpm install
doesn't run the post-install scripts, the Cypress binaries don't get downloaded, and my Cypress tests fail.Changing the Cypress cache folder, for instance to put it inside the pnpm store directory, is not ideal either, as it's done via an env var which has to be declared when both installing and running Cypress. And again, I have to remember to set the env var in every job, which adds complexity to my CI workflows.
Alternatively, instead of having a dedicated key for specifying additional cache paths, perhaps it would be worth introducing a more general way to extend the underlying
actions/cache
configuration. 🤷The text was updated successfully, but these errors were encountered: