BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[FEATURE] Enable caching of dependencies to save build minutes

Open Pranav016 opened this issue 3 years ago • 2 comments

Description

  • In .github/workflows/build.yaml we can cache the dependencies based on changes in package-lock.json .
  • This will help make our build much faster.
  • Since for free tier, only 2000 build minutes/month are allotted on github actions servers, if in future the project becomes very large, we can take advantage of caching and keep the build times low.

I would like to work on this issue

  • I will create hashes for the package-lock and setup lookups based on hashes to help fetch the cache if the dependencies are same as before.

Please assign me this issue if found valid 🙂

Screenshots

No response

Additional information

  • Also I found that there was a lot of code duplication among .github/workflows/build.yaml file and the other workflows as well such as checking out to the repo in the VM and then installing all dependencies.
  • I do know a couple ways that might help but not sure about them. I can raise new issue for this and research on it as well or we can discuss with other community members.
  • A couple ways that I have for this are making a single reusable template(composite actions) or combining jobs just have separate steps but that would compromise parallelism but then we don't have to setup a new environment again.
  • Let me know if this sounds valid, I'll raise a new issue for it then and research on it a bit more.

Pranav016 avatar Feb 12 '22 06:02 Pranav016

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

github-actions[bot] avatar Feb 12 '22 06:02 github-actions[bot]

Interesting idea @Pranav016 , we have not got anywhere near the limit of our usage allowance and I don't think the wait time is that long.

Thank you for raising the PR, I left a comment in there

Sorry for taking so long to respond

eddiejaoude avatar May 24 '22 12:05 eddiejaoude