Skip to content

Commit a743935

Browse files
Merge pull request #60 from r1chardj0n3s/cache-pip-workflow
Add cache to pip install process in GitHub Actions
2 parents 0749004 + ec06940 commit a743935

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ jobs:
3232
with:
3333
python-version: ${{ matrix.python-version }}
3434

35+
- uses: actions/cache@v2
36+
with:
37+
path: ~/.cache/pip
38+
# This is like the example but we use ``*requirements.txt`` rather
39+
# than ``requirements.txt`` because we have multiple requirements
40+
# files.
41+
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
42+
restore-keys: |
43+
${{ runner.os }}-pip-
44+
3545
- name: "Install dependencies"
3646
run: |
3747
python -m pip install --upgrade 'pip ${{ matrix.pip-version }}'

0 commit comments

Comments
 (0)