-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Make the mypy-based tests faster! #2664
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2664 +/- ##
==========================================
- Coverage 98.15% 98.09% -0.07%
==========================================
Files 118 118
Lines 16480 16536 +56
Branches 2983 3000 +17
==========================================
+ Hits 16176 16221 +45
- Misses 249 256 +7
- Partials 55 59 +4
|
0755635
to
5a771fa
Compare
Timeouts are annoying, I think fixing those (probably just making mypy run once without pytest timeout and share that cache whereever) Edit: also I see this ended up being slower by 2 minutes... huh?? |
|
||
# I have not researched why these are missing, should maybe create an issue | ||
# upstream with jedi | ||
if tool == "jedi" and sys.version_info >= (3, 11): |
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.
In case it isn't obvious, this changed from sys.version_info >= (3, 12)
to sys.version_info >= (3, 11)
cause of a backport, probably.
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.
We could also set up a shared cache dir across the jobs - I think we can assume that mypy will generate the same cache on different OS's, and could then also use that in check.sh
.
Not sure if https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows or https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts would be the way to go.
Is it still slower? Maybe mypy's cache parsing is sufficiently optimized that (only) sidestepping it doesn't actually improve it. |
Nope, that comment's out of date. It's like 1/3rd faster now. (
Eh, not too keen on this. Mypy's cache can lead to issues and I don't think an extra 10 seconds or so in the tests is worth the wackiness it leads to. |
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.
2 small changes, feel free to merge after addressing them!
1f75b1f
to
7be61ff
Compare
Rewrote history a bit to make the merge look neater, feel free to merge via merge commit (do the honors!)! |
This makes some of the tests slower cause it stops using an (implicit) cache in CWD. This makes them generally faster, however.
Fixes #2662
Edit: huh, did not realize I pressed the "assignees" button!