julia-actions / cache

A shortcut action to cache Julia artifacts, packages, and registries.
MIT License
38 stars 9 forks source link

Also test packages dir #5

Closed rikhuijzer closed 2 years ago

rikhuijzer commented 2 years ago

I found a bug. Only the artifacts dir was cached even when more paths were passed in. So, I expanded the tests and confirmed that the test failed. The problem was caused by GitHub dropping newlines somewhere between setting the variable in the first step and reading the variable in the second step.

This is now solved by passing separate variables and joining them (format) in the cache step.

rikhuijzer commented 2 years ago

To double check. I've tested this on another repository too. With cache-registries: "true", the logs clearly show that many files in all three directories are getting restored. This should save a lot of time because GitHub puts all files in one neat zipped blob. That seems to be the case, because the running time is reduced by 97 - 69 = 28 seconds (29 %) on the second run.