Skip to content

Conversation

@harshil21
Copy link
Member

@harshil21 harshil21 commented Jan 2, 2023

Attempts to speed up the test suite by caching GH actions dependencies. About ~1 mins is used every run just to install our dependencies. This should save that.

More info about how the cache is used (and also not used) can be found at https://github.com/actions/setup-python#caching-packages-dependencies

Edit: Confirmed the cache is working correctly by checking both https://github.com/python-telegram-bot/python-telegram-bot/actions/caches & the pytest logs in the workers below.

@harshil21 harshil21 added the ⚙️ tests affected functionality: tests label Jan 2, 2023
@harshil21 harshil21 added this to the v20.1 milestone Jan 2, 2023
@Bibo-Joshi
Copy link
Member

Nice idea 👍 just to clarify: this "only" removes the need to download the wheels each time, but pip still need to install them.
Can you link to a CI run where downloading and installing took 1min? I clicked around a bit and mostly found that step taking 20-30 or even just 10 seconds...

@harshil21
Copy link
Member Author

Nice idea 👍 just to clarify: this "only" removes the need to download the wheels each time, but pip still need to install them.

precisely.

Can you link to a CI run where downloading and installing took 1min? I clicked around a bit and mostly found that step taking 20-30 or even just 10 seconds...

https://github.com/python-telegram-bot/python-telegram-bot/actions/runs/3825220803/jobs/6508026698

This takes 54s in the "install dependencies" tab, but it doesn't even include the one happening in pytest (after we test without dependencies). The precise time for that isn't available, but when I was looking at it live, it took about 30s or so

@Bibo-Joshi
Copy link
Member

Thanks for the link. Even if the advantage is not huge, I see no downsides of this change. I'll give the others a chance to chime in if they see the need and merge on thursday evening otherwise :)

@Bibo-Joshi Bibo-Joshi merged commit 2797d9d into master Jan 6, 2023
@Bibo-Joshi Bibo-Joshi deleted the cache-actions-dep branch January 6, 2023 07:13
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚙️ tests affected functionality: tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants