From 4557c6a9371e49c24ed13f8f07008d0f0ebe592c Mon Sep 17 00:00:00 2001 From: Guillermo Eijo Date: Thu, 22 Oct 2020 21:35:30 -0300 Subject: [PATCH 1/2] Add example for python pipenv --- examples.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples.md b/examples.md index c66eca6..793e84a 100644 --- a/examples.md +++ b/examples.md @@ -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) @@ -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 From cbbf882ea426fecbdf43d4065f0c5d129c0cad29 Mon Sep 17 00:00:00 2001 From: Guillermo Eijo Date: Thu, 22 Oct 2020 22:04:58 -0300 Subject: [PATCH 2/2] Add link to example to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a8214c7..8c0a808 100644 --- a/README.md +++ b/README.md @@ -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)