-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat: make tests run in parallel #1312
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1312 +/- ##
=======================================
Coverage 55.96% 55.97%
=======================================
Files 420 420
Lines 65380 65380
=======================================
+ Hits 36592 36598 +6
+ Misses 25932 25926 -6
Partials 2856 2856 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice ! Do you have an after and before comparaison for test time ?
@gfanton
So ~4mins faster 🚀 (ignore the tee, I use it to capture any random test functionality) Keep in mind our CI workflows are ran in parallel, and this is just a local test run; We should however see a slight increase in CI run speed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only touching tests and already approved multiple times, so merging!
I made an rg
command to look for tests which still are not parallel (will contain false positives, but good if anyone wants to pick up your efforts:
rg --iglob '*_test.go' --pcre2 --sort=path -r '$1' -o -U 'func (Test[^\(]*)\(.*\n\t(?!t\.Parallel)'
🎉
## Description This PR simply introduces `t.Parallel()` for unit tests that can support it. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> --------- Co-authored-by: Guilhem Fanton <[email protected]>
Description
This PR simply introduces
t.Parallel()
for unit tests that can support it.Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description