Compare commits

...

2 Commits

Author SHA1 Message Date
Melvyn Sopacua 778e8601d6
Merge ce207c8817 into 2cdf405574 2024-10-08 21:20:08 +09:00
Melvyn Sopacua ce207c8817
doc(python-pipenv): Add run example
Using the cache is only effective when not using install as it will run
`pipenv --rm` if it detects an old environment. On top of that, pip is a
lot faster at detecting satisfied requirements.
2021-03-27 16:12:34 +01:00
1 changed files with 9 additions and 0 deletions

View File

@ -542,6 +542,15 @@ jobs:
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }} key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
``` ```
To use the cache effectively:
```yaml
- name: Install packages
run: |
pipenv --venv && \
(pipenv lock -r |cat - ci-requirements.txt|pipenv run pip install -r /dev/stdin) || \
(pipenv install --python ${{ matrix.python-version }} --deploy)
```
## R - renv ## R - renv
For renv, the cache directory will vary by OS. The `RENV_PATHS_ROOT` environment variable is used to set the cache location. Have a look at https://rstudio.github.io/renv/reference/paths.html#details for more details. For renv, the cache directory will vary by OS. The `RENV_PATHS_ROOT` environment variable is used to set the cache location. Have a look at https://rstudio.github.io/renv/reference/paths.html#details for more details.