Skip to content

test(cherry-pick-v12): use tsx for E2E tests instead of ts-node (#25399)#26233

Merged
danjm merged 1 commit intoVersion-v12.0.0from
cherry-pick-d70b65010f-v12
Jul 30, 2024
Merged

test(cherry-pick-v12): use tsx for E2E tests instead of ts-node (#25399)#26233
danjm merged 1 commit intoVersion-v12.0.0from
cherry-pick-d70b65010f-v12

Conversation

@danjm
Copy link
Copy Markdown
Contributor

@danjm danjm commented Jul 30, 2024

Cherry pick d70b650 (#25399) to v12

On my computer, it took 17 seconds just to launch Mocha for an E2E test. Not launch a browser, not start chromedriver/Ganache, not withFixtures. 17 seconds just to launch Mocha and do nothing. And on CircleCI, this 17 seconds happens thousands of times per workflow.

A lot of this time was taken by `ts-node`, which has a very slow startup time. I switched to using `tsx`, which is much much faster.

[CircleCI Insights on `develop` showing about 16k credits per workflow](https://app.circleci.com/insights/github/MetaMask/metamask-extension/workflows/test_and_release/overview?branch=develop&reporting-window=last-24-hours)

[CircleCI Insights on this branch showing about 12k credits per workflow](https://app.circleci.com/insights/github/MetaMask/metamask-extension/workflows/test_and_release/overview?branch=e2e%2Fuse-tsx&reporting-window=last-24-hours)

After this is merged and observed for a bit, it may make sense to rebalance some `parallelism` in `config.yml`.

---------

Co-authored-by: David Murdoch
<187813+davidmurdoch@users.noreply.github.com>
@danjm danjm requested review from a team and kumavis as code owners July 30, 2024 19:10
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@danjm danjm changed the base branch from develop to Version-v12.0.0 July 30, 2024 19:11
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jul 30, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.61%. Comparing base (acce791) to head (d70b650).

Additional details and impacted files
@@               Coverage Diff                @@
##           Version-v12.0.0   #26233   +/-   ##
================================================
  Coverage            65.61%   65.61%           
================================================
  Files                 1368     1368           
  Lines                54600    54600           
  Branches             14183    14183           
================================================
  Hits                 35825    35825           
  Misses               18775    18775           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danjm danjm merged commit f356591 into Version-v12.0.0 Jul 30, 2024
@danjm danjm deleted the cherry-pick-d70b65010f-v12 branch July 30, 2024 20:25
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [d70b650]
Page Load Metrics (145 ± 201 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6810381105
domContentLoaded9201121
load421973145420201
domInteractive9201121

@metamaskbot metamaskbot added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jul 30, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

No release label on PR. Adding release label release-12.0.0 on PR, as PR was cherry-picked in branch 12.0.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-12.0.0 Issue or pull request that will be included in release 12.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants