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

Optimize & lighten tests #36

Open
fluiderson opened this issue Sep 27, 2023 · 2 comments
Open

Optimize & lighten tests #36

fluiderson opened this issue Sep 27, 2023 · 2 comments

Comments

@fluiderson
Copy link
Contributor

fluiderson commented Sep 27, 2023

Currently, tests take up an enormous amount of time of the CI workflow. On average, from 2 hours of the workflow they consume almost 3/4 of this time. The reason, initially, all tests were written for executing in separated repositories where, individually, tests didn't take up a lot of time but now, in a single workspace, this has become very critical. Therefore, we need to somehow reduce the time for tests.

Here are some ideas:

  1. Analyze, rewrite & reduce the number of tests up to the most necessary
    The most time consuming tests use gclient. Some of them didn't need it all, and can be rewritten with gtest. Also, some tests are implemented for high load testing and as well take a long time. They can be moved to a separate manually controlled CI workflow or can be simply ignored by the main workflow.
  2. Use a custom node binary optimized for a faster execution
    Right now we use the node binary from the official builds. By default, it's using a configuration close to one on the public net. Perhaps there can be some flags or we can modify node's internals to speed it up. Of course, security consideration must be taken to make sure that the custom node won't suppress any bugs that later may be found in the default node.
  3. Put all tests for into one file in each workspace member
    This'll degrade readability but may reduce the execution time because tests in one file are executed in parallel.
@Madib036
Copy link

Contracts CI

@solana-hiro
Copy link

in my opinion, if possible, it will be good to refer all 3 cases.
Good luck.

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

No branches or pull requests

3 participants