Skip to content

Pip dependencies not getting cached even after successful restore #26096

Answered by NicoNBW
sayakpaul asked this question in Actions
Discussion options

You must be logged in to vote

Hi @sayakpaul
Please try again with the following yml:

jobs:
  run:
    runs-on: ubuntu-latest
steps:
  - uses: actions/checkout@v2
  - name: Set up Python 3.x
    uses: actions/setup-python@v2
    with:
      python-version: '3.7'    
   
  - uses: actions/cache@master
    id: cache
    with:
      path: ${{ env.pythonLocation}}/lib/python3.7/site-packages/*
      key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
      restore-keys: |
        ${{ runner.os }}-pip-
        ${{ runner.os }}-
        
  - name: Install Dependencies
    if: steps.cache.outputs.cache-hit != 'true'
    run: |
      echo "Installing dependencies and caching them."
      pip install -r requirements.…

Replies: 14 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
3 participants