Skip to content

Commit 51c001a

Browse files
Merge pull request #1382 from VWS-Python/pip-cache
Try to add a cache for pip
2 parents fb639a4 + 0329a5f commit 51c001a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ jobs:
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131

32+
- uses: actions/cache@v2
33+
with:
34+
path: ~/.cache/pip
35+
# This is like the example but we use ``*requirements.txt`` rather
36+
# than ``requirements.txt`` because we have multiple requirements
37+
# files.
38+
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
39+
restore-keys: |
40+
${{ runner.os }}-pip-
41+
3242
- name: "Install dependencies"
3343
run: |
3444
python -m pip install --upgrade pip setuptools wheel

.github/workflows/windows-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ jobs:
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131

32+
- uses: actions/cache@v2
33+
with:
34+
path: ~\AppData\Local\pip\Cache
35+
# This is like the example but we use ``*requirements.txt`` rather
36+
# than ``requirements.txt`` because we have multiple requirements
37+
# files.
38+
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
39+
restore-keys: |
40+
${{ runner.os }}-pip-
41+
3242
- name: "Install dependencies"
3343
run: |
3444
python -m pip install --upgrade pip setuptools wheel

0 commit comments

Comments
 (0)