Skip to content

Commit

Permalink
Merge pull request #443 from guilleijo/pipenv-example
Browse files Browse the repository at this point in the history
Add example for python pipenv
  • Loading branch information
Konrad Pabjan authored and GitHub committed Dec 15, 2020
2 parents 7b630ee + cbbf882 commit 9f3a4d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us
- [OCaml/Reason - esy](./examples.md#ocamlreason---esy)
- [PHP - Composer](./examples.md#php---composer)
- [Python - pip](./examples.md#python---pip)
- [Python - pipenv](./examples.md#python---pipenv)
- [R - renv](./examples.md#r---renv)
- [Ruby - Bundler](./examples.md#ruby---bundler)
- [Rust - Cargo](./examples.md#rust---cargo)
Expand Down
12 changes: 12 additions & 0 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- [Multiple OSes in a workflow](#multiple-oss-in-a-workflow)
- [Using pip to get cache location](#using-pip-to-get-cache-location)
- [Using a script to get cache location](#using-a-script-to-get-cache-location)
- [Python - pipenv](#python---pipenv)
- [R - renv](#r---renv)
- [Simple example](#simple-example-1)
- [Multiple OSes in a workflow](#multiple-oss-in-a-workflow-1)
Expand Down Expand Up @@ -379,6 +380,17 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu.
${{ runner.os }}-pip-
```

## Python - pipenv

```yaml
- uses: actions/cache@v2
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
```

## R - renv

For renv, the cache directory will vary by OS. Look at https://rstudio.github.io/renv/articles/renv.html#cache
Expand Down

0 comments on commit 9f3a4d3

Please sign in to comment.