DSGT-DLP / Deep-Learning-Playground

Web Application where people new to Deep Learning can input a dataset and toy around with basic Pytorch modules without writing any code
MIT License
26 stars 8 forks source link

Speed up react build checks #888

Closed noah-iversen closed 1 year ago

noah-iversen commented 1 year ago

Speed up react build checks

What user problem are we solving?

When minor changes are made to frontend directory, yarn install is run resulting in rather slow build times.

What solution does this PR provide?

This solution takes advantage of actions/cache@v3 and caches node_modules to prevent redundant yarn installations.

Testing Methodology How did you test your changes and verify that existing functionality is not broken

I ran the workflow through GitHub Actions and noticed it went from over 1 minute build times to around 30 seconds. Solid improvement!

Any other considerations Since we're caching the node_modules directory itself, we must be mindful when changing node versions. However, since we assert the node version in the workflow itself, this shouldn't be an issue.

farisdurrani commented 1 year ago

Looks good! It should be noted we are changing the NodeJS version to 20 on 10/24 when the version becomes Active. But for now, let's merge in this PR @noah-iversen

karkir0003 commented 1 year ago

i see. thanks for letting us know @farisdurrani

does nodejs have some automated way to update to latest stable version?

farisdurrani commented 1 year ago

It's like upgrading from Python 3.9 to 3.10. It happens on the OS level so it's not automatable unfortunately