#27 cache the volta inventory to reduce times tools need to be downloaded
Fixes #27
This uses the @actions/cache package provided to cache the inventory (cache) of Volta. So that installing the tools needed for the build can work even if the download would be down.
I was triggered to do this by the instability of the node-download-servers in resent weeks.
Since I have no expertise in how exactly Volta works internally and therefore am not 100% sure if this is enough for Volta to work with, I would greatly appreciate feedback.
Ideas on how to cover this with tests, are also very welcome.
Inner workings:
I try to clean up the Volta inventory during teardown and only keep the tools that where actually installed during the run. When uploading the cache I create a cash-key based on the content of the inventory, so that a change in it's content also results in new and updated cache entry.
Limitations right now:
As far as I can tell, the cache is shared across all workflows in a repository. Therefore a project with pipelines all installing different tools might lead to continuous outdated cache entries, since the newest one will be pulled during setup, no matter the hash-suffix.
Oh no! I'm very sorry for missing this PR. Reviewing now...