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

Add the requirements-key parameter to the pyenv GitHub Action #7028

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Aug 31, 2022

This PR fixes #7026 by adding the dedicated requirements-key parameter.

This parameter will be used in the restore-virtualenv@v1.2.1 action as a value on which the cache key be generated.

    - name: Restore virtual env
      uses: drew2a/restore-virtualenv@v1.2.1
      id: cache-virtualenv
      with:
        requirement_files: ${{inputs.requirements-key}}

The old parameter requirements is still be used for passing it into:

    - name: Install pip dependencies
      if: steps.cache-virtualenv.outputs.cache-hit != 'true' || inputs.invalidate-cache == 'true'
      shell: bash
      run: |
        python -m pip install --upgrade pip
        pip install -r ${{inputs.requirements}}

Therefore by default for the cache key generation, we use the pattern **/requirements*.txt which can be translated into:

requirements-build.txt
requirements-core.txt
requirements-test.txt
requirements.txt

Therefore **/requirements*.txt value suits all our actions although it is a bit redundant (by default).

@drew2a drew2a marked this pull request as ready for review August 31, 2022 13:19
@drew2a drew2a requested review from a team and kozlovsky and removed request for a team August 31, 2022 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Pyenv GitHub action does not see changes in requirements.txt
2 participants