data
data copied to clipboard
Github Actions artifact caching
We currently have two categories of assets for which a cache would significantly improve the run times of our actions-based PR checks. The actions/cache that Github provides is ideal for this.
- [x] node_modules
We should cache node_modules by hashing our yarn.lock file. This would allow commits that do not change the lock file to reuse the same assets easily.
Example: https://github.com/actions/cache/blob/master/examples.md#node---yarn
- [ ] Production Build Dists
We should cache the built dist
artifacts from yarn workspace ember-data ember build -e production
. These should be cached by SHA
. Most commonly commits comparing themselves to master
will reuse SHAs on master (AssetSizeCheck, Tracerbench perf analysis), but also we currently do production builds for the SHA being tested by the AssetSizeCheck as well as for running tests in production. We should be able to build once for both jobs.
@runspired is there an easy way to bust the cache? I have some ptsd from cached node_modules
@igorT we would likely use an ENV for that. It’s a good question for the actions team though I’ll ask them.
How would that work? Lets say a test suspiciously fails, I would make a new commit with a flag?
Probably. There’s a lot of things we could do. We could also write an action that we manually trigger from the UI to purge all caches I think, need to check on that.
We mostly have this infra in place now, but would love someone to finish polishing it up and getting it over the line