Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

pip install requirements.txt does not cache #51

Open
baotran2207 opened this issue Feb 28, 2022 · 0 comments
Open

pip install requirements.txt does not cache #51

baotran2207 opened this issue Feb 28, 2022 · 0 comments

Comments

@baotran2207
Copy link

I have a app files in tree

my-app
    infrastructure
          requirements.txt (1)
    runtime
          requirements.txt (2)
    requirements.txt (3)

The content in requirements.txt. (3) , basically it is just run 2 requirements in run_time (the app), and requirements in infrastructure (cdk) .

# requirements.txt (3) file
-r infrastructure/requirements.txt # install (1)
-r runtime/requirements.txt # install (2)

The issue is that , the step cdk deploy re-install packages in requirements.txt again althought i already installed on step install dep

on:
 push:
  branches: [ main, dev ]
 pull_request:
   branches: [ main ]

jobs:
  aws_cdk:
    runs-on: ubuntu-latest
    steps:

      - name: checkout
        uses: actions/checkout@v2

      - name: install dep
        uses: actions/setup-python@v2
        with:
          python-version: '3.9.1'
          cache: 'pip'
      run: pip install -r requirements.txt ; ## i run installation for  requirements.txt. (3)
  

      - name: cdk deploy
        uses: youyo/aws-cdk-github-actions@v2
        with:
          cdk_subcommand: 'deploy'
          cdk_version: '1.145.0'
          cdk_args: '--require-approval never '
          working_dir: 'infrastructure' ##  requirements.txt (1) reinstall again , even i installed in previous step
          actions_comment: false
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_PERSONAL }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_PERSONAL }}
          AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION_PERSONAL }}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant