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

test: optimize test runner for e2e-tests and ci #1142

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

TarikGul
Copy link
Member

  1. This optimizes the test runner for the e2e tests by assigning the max concurrent workers, and the allotted CPU that is available. It also uses a trick to isolateModules since our test runner utilizes ts-jest (And by nature is slow).

  2. Use --runInBand for running CI tests to not abuse CPU usage in the github actions runner.

@TarikGul TarikGul requested review from a team as code owners November 21, 2022 20:31
Copy link
Contributor

@Imod7 Imod7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Just some additional ideas in case it is interesting for you (from this write up) :

  • jest-offline ?
  • upgrade to jest 28 ?
  • use jest-slow-test-reporter to identify the slowest tests ?
  • switch to @swc/jest ?

Actually all 7 suggestions are interesting to check if you have time (MaxWorkers=50% is one of them :) )

@TarikGul
Copy link
Member Author

LGTM! Just some additional ideas in case it is interesting for you (from this write up) :

  • jest-offline ?
  • upgrade to jest 28 ?
  • use jest-slow-test-reporter to identify the slowest tests ?
  • switch to @swc/jest ?

Actually all 7 suggestions are interesting to check if you have time (MaxWorkers=50% is one of them :) )

Oooo Thanks for the link to the write up. So I do know updating to jest 28 causes some issue in substrate-js-dev to sidecar. Maybe we can explore into solving that issue, it has to do with all the plugins that we use. jest-offline sounds interesting as well. I'll have a look at it, and see what we can add

@TarikGul
Copy link
Member Author

So Im going to merge this in, lets focus on the next set of optimizations by updating jest in substrate-js-dev. I'll make an issue there about it so we can move it into here when its done.

@TarikGul TarikGul merged commit f635d59 into master Nov 24, 2022
@TarikGul TarikGul deleted the tarik-improve-jest-speed-e2e branch November 24, 2022 14:43
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants