Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI / monorepo improvements #6103

Open
3 of 8 tasks
Nodonisko opened this issue Aug 24, 2022 · 0 comments
Open
3 of 8 tasks

CI / monorepo improvements #6103

Nodonisko opened this issue Aug 24, 2022 · 0 comments
Labels
code Code improvements

Comments

@Nodonisko
Copy link
Contributor

Nodonisko commented Aug 24, 2022

This issue describe possible improvements of monorepo tooling and CI:

  • 1. Stop using script with : in workspace scripts. This is conflictin with both Yarn 3 and Nx conventions. We can't use nx run because it needs to be called in pattern nx run packageName:scriptName and when there is : in scriptName it will fail. It also causes problem because Yarn 3 considering these scripts as global scripts. (lint:js => lint-js, build:libs => build-libs etc.).
  • 2. Replace lerna commands with simple nx run (this require point 1 to be done).
  • 3. Use global script for tsc same as g:eslint
  • 4. Remove "build:libs" step from Github validation workflow. Both type-check and test:unit has dependency on it defined thanks to Nx, so Nx will call it only when it's necessary. This is not big deal because if it's called second time it's cached anyway.
  • 5. Improve Yarn cache - current cache is invalidated everytime when yarn.lock is changes and that is very often because also our internal packages dependencies are defined here since upgrade to Yarn 3. We probably don't need to invalidate cache at all. More info here Performance opportunity for yarn 3 cache actions/setup-node#325
  • 6. Speed up code formatting with prettier - Nx probably could be configured to run formatting only affected files. This should save ~40s. https://nx.dev/nx/format-check
  • 7. Consider caching of Nx cache folder in Github actions, this should save us some remote cache hits, which are limited in free plan.
  • 8. Nx affected API can be used also for Gitlab to skip some of builds and intergration test runs when these builds of tests are not affected by changes done in PR.

Related to: #6095 #4936

@Nodonisko Nodonisko added the code Code improvements label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code improvements
Projects
Status: No status
Development

No branches or pull requests

1 participant