-
Notifications
You must be signed in to change notification settings - Fork 130
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
chore(tests): do not run unit tests in parallel #1645
chore(tests): do not run unit tests in parallel #1645
Conversation
|
My only concern is how long the testing will take. I have a feeling that we can fix most of these issues by cleaning up the tests. |
@schultzp2020 Yep, I had similar thoughts. But I personally think it's more important to reduce the flakyness. 🤷♂️ I also added more information and logs to the initial comment. Running all unit tests in a sequence takes around 4 min on my machine. I can not compare it with the parallel run because it never run successfully. But I expect a something between 1-3 minutes. 😏 And the overall GHA with yarn install, etc. takes ~12 minutes (before it fails). It will (still) run all these tests only if the package.json, yarn.lock, etc. is touched. When only a plugin/workspace is touched, it will still run only the tests of that workspace. |
even if this makes test runs longer I think it is worth it. Less testing failures due to flaky test will at the end save a lot more time |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kadel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Turbo supports caching for tasks, including build(ing), lint(ing), and even test(ing).
While investigating why #1480 failed multiple times, I noticed that different tests fail our GitHub Actions and on my local machine. But when I tried to run the tests for a single workspace/plugin these tests pass...
I could reproduce this when disable the cache. The currency is 10 by default and many different workspaces fail:
But when running all workspaces in a sequence, the test runs successfully:
Of course, it would be nice to investigate whether we can run all or more tests in parallel. But for now, I want to ensure that the tests run sequentially / successfully.
But will this increase the test time? Yes, but only if all tests run, for example, when the package.json is changed. Tests of untouched workspaces will (still) not run! In my machine running all tests takes ~ 4 min.
I also added the
yarn.lock
to theglobalDependencies
to ensure that we rerun builds and tests if any dependency changes!