Describe the bug
I defined REPO_DIR=/srv/repo and the repo2docker action chowns this to the root user. Therefore in the action, when using docker run for pytesting files in image-tests, this also needs to be run with the -u root rather than the -u 1000 flag so that the REPO_DIR is read-writable, which is required for generating a .pytest_cache folder.
To Reproduce
Steps to reproduce the behavior:
Define REPO_DIR=/srv/repo
Add test to image-tests
Push to remote repo to trigger repo2docker action
See error
../../opt/conda/lib/python3.11/site-packages/_pytest/stepwise.py:57
/opt/conda/lib/python3.11/site-packages/_pytest/stepwise.py:57: PytestCacheWarning: could not create cache path /srv/repo/image-tests/.pytest_cache/v/cache/stepwise: [Errno 13] Permission denied: '/srv/repo/image-tests/.pytest_cache'
session.config.cache.set(STEPWISE_CACHE_DIR, [])
Describe the bug I defined
REPO_DIR=/srv/repo
and the repo2docker action chowns this to theroot
user. Therefore in the action, when usingdocker run
forpytest
ing files inimage-tests
, this also needs to be run with the-u root
rather than the-u 1000
flag so that theREPO_DIR
is read-writable, which is required for generating a.pytest_cache
folder.To Reproduce Steps to reproduce the behavior:
REPO_DIR=/srv/repo
image-tests