Skip to content
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

Set up caching PyPI deps in GHA #1378

Merged
merged 2 commits into from Apr 21, 2021
Merged

Set up caching PyPI deps in GHA #1378

merged 2 commits into from Apr 21, 2021

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Apr 7, 2021

Ref #1375 (comment)

Changelog-friendly one-liner: Made GHA workflows faster by enabling pip cache

Contributor checklist
  • Provided the tests for the changes.
  • Gave a clear one-line description in the PR (that the maintainers can add to CHANGELOG.md on release).
  • Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

@webknjaz webknjaz added maintenance Related to maintenance processes enhancement Improvements to functionality ci Related to continuous integration tasks labels Apr 7, 2021
@webknjaz webknjaz requested a review from atugushev April 7, 2021 23:03
@codecov

This comment has been minimized.

Copy link
Member

@atugushev atugushev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@webknjaz webknjaz merged commit 44ed2da into master Apr 21, 2021
@webknjaz webknjaz deleted the maintenance/gha-cache branch April 21, 2021 15:41
@jezdez
Copy link
Member

jezdez commented Apr 21, 2021

@webknjaz It would be great to follow patterns that we've established in other Jazzband repos, e.g. the pip cache dir should not be hardcoded here. Instead use pip cache dir to get it, like in contextlib2. Thank you!

@webknjaz
Copy link
Member Author

webknjaz commented Apr 21, 2021

@jezdez got it, thanks for the feedback!

I think I copied this from one of my projects where pip cache dir is not a thing because it's old so I didn't bother overcomplicating it there. But I see the value of having it identified dynamically.

@jezdez
Copy link
Member

jezdez commented Apr 21, 2021

@jezdez got it, thanks for the feedback!

I think I copied this from one of my projects where pip cache dir is not a thing because it's old so I didn't bother overcomplicating it there. But I see the value of having it identified dynamically.

Gotcha, we switched to that CLI call only a bit ago when pip gained this subcommand, so no worries!

@webknjaz
Copy link
Member Author

#1389

@hugovk
Copy link
Member

hugovk commented Feb 4, 2022

pip can now be cached via actions/setup-python to save a lot of config:

https://github.com/actions/setup-python#caching-packages-dependencies

Please see #1571 for an alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Related to continuous integration tasks enhancement Improvements to functionality maintenance Related to maintenance processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants