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 a PDM_CACHE_DIR environment variable #2485

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

deronnax
Copy link
Contributor

@deronnax deronnax commented Dec 12, 2023

Pull Request Checklist

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

I made cache_dirconfigurable through an environment variable. Some CI impose some restriction on the location of what can be cached. For example, Gitlab CI mandates that the cache directory be a children of the build directory. And pdm config cache_dir is hardly usable when you have a big CI configuration where many blocs override each others.

I saw the $HOME tricks recommended by the env var but I think it would break our code base.

@frostming
Copy link
Collaborator

A news fragment is added in news/ describing what is new.

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d5d5004) 84.63% compared to head (7e4241c) 84.63%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2485   +/-   ##
=======================================
  Coverage   84.63%   84.63%           
=======================================
  Files         104      104           
  Lines       10332    10332           
  Branches     2257     2257           
=======================================
  Hits         8744     8744           
  Misses       1115     1115           
  Partials      473      473           
Flag Coverage Δ
unittests 84.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@deronnax
Copy link
Contributor Author

Sorry, it was mostly a PoC, I did not expect tests to be green and you to notice so fast. It's done.

@deronnax deronnax changed the title PDM_CACHE_DIR env var add a PDM_CACHE_DIR environment variable Dec 12, 2023
@frostming frostming merged commit 1c0f8e8 into pdm-project:main Dec 13, 2023
20 checks passed
@j178 j178 mentioned this pull request Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants