Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit a9a7ea3

Browse files
author
John Andersen
authored
ci: Cache pip
Signed-off-by: John Andersen <[email protected]>
1 parent ef28bed commit a9a7ea3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/testing.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ jobs:
2727
uses: actions/setup-node@v1
2828
with:
2929
node-version: ${{ matrix.node-version }}
30+
- name: Get pip cache
31+
id: pip-cache
32+
run: |
33+
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
34+
- uses: actions/cache@v1
35+
with:
36+
path: ${{ steps.pip-cache.outputs.dir }}
37+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
38+
restore-keys: |
39+
${{ runner.os }}-pip-
3040
- name: Install dependencies
3141
run: |
3242
python -m pip install --upgrade pip
@@ -54,6 +64,16 @@ jobs:
5464
uses: actions/setup-python@v1
5565
with:
5666
python-version: ${{ matrix.python-version }}
67+
- name: Get pip cache
68+
id: pip-cache
69+
run: |
70+
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
71+
- uses: actions/cache@v1
72+
with:
73+
path: ${{ steps.pip-cache.outputs.dir }}
74+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
75+
restore-keys: |
76+
${{ runner.os }}-pip-
5777
- name: Install dependencies
5878
run: |
5979
mkdir -p ~/.local/bin

0 commit comments

Comments
 (0)