actions-setup-perl icon indicating copy to clipboard operation
actions-setup-perl copied to clipboard

Caching happens earlier than expected

Open ferki opened this issue 2 years ago • 0 comments

If I understand correctly, saving the contents of the local directory happens at the end of the workflow step with shogo82148/actions-setup-perl@v1. Notably, this is different from the behavior of the actions/cache@v3, which saves the cache at the end of the job instead.

This might cause the cache to miss some content, for example any modules that are installed in later steps in the same job manually into the local directory. This might happen e.g. when Dist::Zilla is used to install author dependencies with dzil authordeps | cpm install -.

There might be a better way to solve caching for this specific use case (please let me know), but it might still worth to do one or more of the following:

  • document the current behavior
  • match the behavior of the "standard" caching via actions/cache@v3
  • provide an option to control when caching happens

ferki avatar Apr 18 '22 00:04 ferki