3 ms·
Okay, but how do I get CI for it to not be slow as molasses? I'm just a backend/infra eng, but while I know some JS/TS, I'm not an expert; `yarn install` (which
by deathanatos 4y ago
Okay, but how do I get CI for it to not be slow as molasses? I'm just a backend/infra eng, but while I know some JS/TS, I'm not an expert; `yarn install` (which is all the CI section seems to cover) is slow.
We have a monorepo with about equal gigantic parts Rust & TypeScript. The Rust part builds ~1100 crates in ~8 minutes, and runs all the unit tests after another ~9 min. (~17 min total.) The yarn install part of our CI takes ~39 minutes. (Not really sure how to do a "# of crates" style comparison.) (And at 39 minutes, this is very much on CI's critical path. The Rust stuff … isn't. The irony of a compiled language beating the pants off one that is only sort-of isn't lost on us.)
- kitten_mittens_ 4y agoSounds like https://yarnpkg.com/features/zero-installs https://yarnpkg.com/features/zero-installs might be something to help out. Especially if those installs are mostly just filling out a giant set of node modules folders.
- postalrat 4y agoTake this advice with a grain of salt cause I'm not an expert. You can save the contents of the yarn cache directory between builds. Set it with the YARN_CACHE_FOLDER environment variable. Build an intermediate docker image with all packages built. Later images can be based from that and don't need to rebuild.