-
Notifications
You must be signed in to change notification settings - Fork 578
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
What if I need to cache both pip and pipenv, is that possible? #934
Comments
Hello @nabheet, |
Hi @nabheet 👋, name: Cache pip and pipenv
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pipenv packages
uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
- name: Install dependencies
run: |
pip install --upgrade pip
pip install pipenv
pipenv install --deploy --ignore-pipfile In this example, the I hope this helps! Let us know if you have any further questions. |
Hi @nabheet, Just a friendly reminder regarding the solution I provided for caching both pip and pipenv dependencies. Have you had a chance to try it out? If you have any questions or need further assistance, please let me know. Thank you! |
Sorry I just got back from vacation. I believe this should work for us. I will close this issue for now as it will take me a few days to confirm. Thank you! |
I would like to cache both pip and pipenv. Wondering how I would accomplish that.
The text was updated successfully, but these errors were encountered: