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: fix CI - chunk up Jest tests #2096

Merged
merged 1 commit into from
Jul 12, 2022

Commits on Jul 11, 2022

  1. test: fix CI - chunk up Jest tests

    1. ci.yml workflows went through a massive refactoring to parallelize
    the test execution for two main reasons: First this makes it faster,
    second this also reduces the flakyness that comes from our ever growing
    test suite making the test runner consume more and more RAM (the back
    story here is that Yarn needed more than 2 GB RAM at first, and
    when we bumped the heap size up to 3 GB it exhausted that soon after at
    which point it became clear that this is not sustainable at all on the
    long run since our GitHub CI runners come with 7 GB RAM total)
    
    2. tools/ci.sh can now be configured via environment variables:
    
      - DEV_BUILD_DISABLED (defaults to false)
      true/false: if set to true the initial configure script execution is skipped
    
      - FULL_BUILD_DISABLED (defaults to false)
      true/false: if set to true the final full build (webpack & prod builds) is skipped
    
      - JEST_TEST_RUNNER_DISABLED (defaults to false)
    
      true/false: if set to true, Jest tests are skipped completely.
    
      - JEST_TEST_PATTERN (default comes from jest.config.js)
    
      string pattern: if specified, it will narrow the scope of tests as specified
    
      - TAPE_TEST_RUNNER_DISABLED (defaults to false)
    
      true/false: if set to true, Tape tests are skipped completely.
    
      - TAPE_TEST_PATTERN (default comes from .taprc config file)
    
      string pattern: if specified, it will narrow the scope of tests as specified
    
    3. sorted all the yaml keys in the ci.yml file for easier location of the jobs in the future
    since there is now 30+ jobs in the file which are taking up a total of 1k LoC at the moment.
    
    4. TODO for the future is to start using job templates so that the LoC can be reduced significantly
    See point 3. about the details on this.
    
    Fixes hyperledger#2090
    
    Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
    petermetz committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    b9706bf View commit details
    Browse the repository at this point in the history