I currently have a monorepo combine with yarn workspace and lerna. When changes are made to 1 app or 1 package, I will trigger different pipelines to test and build that only changed app/package.
Currently, if I run yarn, it will install dependencies for every apps and packages.
My question is:
- Is it possible to configure lerna or yarn to install dependencies for only that app/package?
- If not, then is it possible to persist node_modules from Install-Yarn-Pipeline to Test-Build-App/Package-Pipeline? (just like you persist to workspace in a workflow)
Here is a rough structure of the repo:
├── apps
├── apps_1
├── apps_2
├── apps_n
├── packages
├── packages_1
├── packages_2
├── packages_n
├── node_modules
├── lerna.json
└── yarn.lock