-
Notifications
You must be signed in to change notification settings - Fork 20
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
use cache for both poetry workflow runs #133
Conversation
...first cache hit, looks like the net saving is ~5 seconds? Poetry accounts for the vast majority of that setup time :( |
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.
I hate to be that person, but there's a much simpler way: https://github.com/actions/setup-python#caching-packages-dependencies
Imo if you're looking for improving testing run times, I think that combining the static check + unit test actions would be better. After all, they are both essentially testing the code itself. Black can remain separate, as it can run in parallel to these and doesn't require poetry.
There was something about unable to pass certain parameters into poetry when using setup-python's cache, but I'll give it a look. If we use setup-python's cache it might even cache the actual poetry install, which would be significantly faster. |
Yeah OK so I can make it cache the actual poetry install, which will be the fastest option (saves ~19s of poetry install on cache hit) but completely locks us out of using setup-python's autocaching because it requires us actually caching the .poetry folder... which is the opposite of your suggestion 💀 I'd prefer to keep tests & typing separate so its easier to see what actually failed on a particular PR, although we don't really have enough tests for that to be a massive problem (yet). Also, because they're separate jobs, it won't really save time - they run in parallel anyway. |
…csbot-discord into cache-actions
Alright, we're now successfully caching poetry and the poetry dependencies. It looks like the I don't believe it's possible to cache anything else, or if its even worth it considering the setup is now 13s of basically just "download the cache files". |
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.
Yeah look, I don't think you're gonna improve much more with the action run times here. I think that even below a minute is still very solid.
Still though, good work
by caching poetry dependencies, we should hopefully significantly speed up the testing and the typing runs.
Theoretically the "fastest" option is to install pyright/pytest on their own, but then we have two places where dependencies are stored, instead of the single-source-of-truth being poetry.