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

Improvements to testing and build infrastructure #1521

Merged
merged 34 commits into from
Aug 11, 2018

Conversation

martijnwalraven
Copy link
Contributor

@martijnwalraven martijnwalraven commented Aug 11, 2018

This PR contains various updates to the testing and build infrastructure.

  • It updates Lerna to 3.x and converts links between packages to use file: specifiers, as recommended by the Lerna author. This requires moving all devDependencies to the top-level package. The big benefit of this is that hoisting and linking no longer relies on lerna bootstrap, but uses native npm mechanisms. Among other things, this gives us a consistent package-lock.json for the entire monorepo.
  • As a consequence, in CI we can now use the much faster npm ci(which depends on package-lock.json).
  • We also update the Circle CI dependency cache to use the package-lock.json checksum and cache the npm cache dir.
  • Instead of invoking a separate Jest runner per package with lerna run test, we now use a single top-level Jest config. This makes tests run a lot faster, and works really well in combination with file watching.
  • To fix Jest in CI, we run with --maxWorkers=2. It turns out Jest by default uses the number of cores, which is way too much when running in a container, and leads to bad performance and failing tests.
  • The top-level tsconfig.json now enables strict and various related settings. I fixed some typing issues in packages, but for others the local tsconfig.json overrides these with less strict options for now. But at least the default is strict and we know where the issues are.
  • I've also cleaned up the package scripts and various other things I ran into to give us a more consistent environment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant