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
Implementation of python's caching #266
Implementation of python's caching #266
Conversation
just minor clean up comments, didn't look closely at core logics yet. I will defer it to someone else or I can come back and take a peek something this week.
Thanks!
|
Tox is another wildly popular tool that manages its own virtual envs and installs dependencies. |
@merwok In a future PR this is something that can definitely be added. I'd be happy to review any contributor PR in the future that adds this support. For the scope of this PR though we're just focusing first on |
|
@dmitry-shibanov This is looking great! Lets fix the failing |
|
This is great, thank you! And for the new release: https://github.com/actions/setup-python/releases/tag/v2.3.0 Please could you also update the |
|
Hello @hugovk. Thank you. I think we'll update v2 tag tomorrow. We want to proceed with some extra validation. |
|
Hello @hugovk. We've updated the |
In scope of this pull request we add possibility to cache python dependencies. We added
cacheinput parameter to the action. For now, input will accept the following values:pip- enable caching for pip dependenciespipenv- enable caching for pipenv dependenciesADR: #247
Related issue: #226
Description
Action will try to search requirements.txt for
pipor Pipfile.lock forpipenvfiles in the repository and throw error if no one is found. The hash of found files will be used as part of cache key (the same approach like actions/cache recommends). The following key cache will be used:Action will cache:
pip cache dir)$HOME/.virtualenvsfor Windows and$HOME/.local/share/virtualenvsfor Linux, macOS)Besides we add
cache-dependency-pathinput. This input will accept an array or regex of dependency files. The field will accept a path (relative to the repository root) to dependency files. If the provided path contains wildcards, the action will search all matching files and calculate a common hash like the${{ hashFiles('**/requirements-dev.txt') }}YAML construction does.Example of yml
Note:
What's done: