Parallelise build, lint, and test actions#128
Conversation
7ca8346 to
f573b8a
Compare
FrederikBolding
left a comment
There was a problem hiding this comment.
This LGTM, but I would appreciate if another engineer could take a look too
|
I've been re-running this and the current This repository is sortof a worse case though, because the actual build/lint/test steps are incredibly short here because of the lack of code, so the overhead of additional CI environments is greater. I would expect this to eventually be faster as the time to build/lint/test increases. There are some parts of the overhead that scale as well (the dependency caching gets slower with more dependencies, and the checkout gets slower as the repository grows), but most overhead is static. |
| YARN_VERSION: ${{ steps.yarn-version.outputs.YARN_VERSION }} | ||
| strategy: | ||
| matrix: | ||
| node-version: [14.x, 16.x, 18.x] |
There was a problem hiding this comment.
Rather than use a matrix for each job, maybe it would be better to create a reusable "build-lint-test" workflow and invoke it using a matrix?
Right now, all runs have to wait for all three prepare runs to complete. But if we move this into a reusable workflow, we can start running the build/test/lint steps for the first prepare job to complete without waiting for the others. And I don't think it would cost any additional overhead either, but I'm not sure.
Gudahtt
left a comment
There was a problem hiding this comment.
LGTM!
Unsure on what performance gains this will get, but at the very least I'd expect it to fail faster in certain cases on larger repositories.
* Parallelise build, lint, and test actions * Fix install * Fix prepare step Node.js version * Fix job name * Use matrix for prepare job * Fix step name * Fix lint issue
Inspired by MetaMask/core#941, this parallelises the build, lint, and test actions. This hypothetically speeds up CI.