mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-30 23:59:16 +01:00
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.
This commit is contained in:
parent
4134e6de47
commit
ce207c8817
1 changed files with 9 additions and 0 deletions
|
@ -417,6 +417,15 @@ jobs:
|
||||||
${{ runner.os }}-pipenv-
|
${{ runner.os }}-pipenv-
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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. Look at https://rstudio.github.io/renv/articles/renv.html#cache
|
For renv, the cache directory will vary by OS. Look at https://rstudio.github.io/renv/articles/renv.html#cache
|
||||||
|
|
Loading…
Reference in a new issue