Closed nicolasahar closed 4 years ago
Hello @nicolasahar!
There is an issue with the 0.2.1 version Orb that prevents it from caching the /home/circleci/.local/bin
directory.
You have two options available
You can not use the built-in load-cache
and save-cache
commands and instead cache manually:
- restore_cache:
key: v1-{{ checksum "requirements.txt" }}
- python/install-deps
- save_cache:
key: v1-{{ checksum "requirements.txt" }}
paths:
- /home/circleci/.local/bin
- /home/circleci/.local/lib
or you can upgrade to the newer 0.3.0
version which has this issue fixed.
cc @felicianotech Note the lack of a /
@nicolasahar I should add you may be able to update this to version 0.2.2
or the Orb as well. See #26
I'm caching my dependencies with python orb (v0.2.1) and I get "command not found" errors for dependencies that are included in my
requirements.txt
file after I load the cache.Specifically, my
coverage
andblack
commands are not found when they are run. The caching seems to work (see output below), but the installed pip packages do not persist in the environment and cannot be used in downstreamrun
commands, unless I completely remove the caching and manually install my repo withsudo pip install .[dev]
(which is too resource-intensive).I've tried other orb versions, including 0.1.9, 0.2.2, and 0.3.0 but I get the same error.
Am I using the cache improperly? Or is there something else I'm missing?
My config.yml file:
Output for run step
coverage run --source=. -m pytest tests/ --verbose
:Output for run step
coverage run --source=. -m pytest tests/ --verbose
:And finally, confirmation that my dependencies (including
black
andcoverage
) are indeed installed:Step
python/install-deps
:Output for step
python/install-deps
: