Skip to content

Commit 73cdcd1

Browse files
authored
Merge pull request #190 from macbre/pip-cache
CI: cache pip dependencies
2 parents 0e7c953 + 912d214 commit 73cdcd1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ jobs:
4444
with:
4545
python-version: ${{ matrix.python }}
4646

47+
# https://github.com/actions/cache/blob/main/examples.md#using-pip-to-get-cache-location
48+
- name: Get pip cache dir
49+
id: pip-cache
50+
run: |
51+
echo "::set-output name=dir::$(pip cache dir)"
52+
53+
- name: pip cache
54+
uses: actions/cache@v2
55+
with:
56+
path: ${{ steps.pip-cache.outputs.dir }}
57+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }}
58+
restore-keys: |
59+
${{ runner.os }}-pip-
60+
4761
- name: Install dependencies
4862
run: make install
4963

0 commit comments

Comments
 (0)