Skip to content

Commit bced4c9

Browse files
Merge pull request #884 from VWS-Python/cache-pip-workflow
Add cache to pip install process
2 parents 3c7b7aa + dc0f591 commit bced4c9

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ jobs:
8888
with:
8989
python-version: ${{ matrix.python-version }}
9090

91+
- uses: actions/cache@v2
92+
with:
93+
path: ~/.cache/pip
94+
# This is like the example but we use ``*requirements.txt`` rather
95+
# than ``requirements.txt`` because we have multiple requirements
96+
# files.
97+
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
98+
restore-keys: |
99+
${{ runner.os }}-pip-
100+
91101
- name: "Install dependencies"
92102
run: |
93103
python -m pip install --upgrade pip setuptools wheel

.github/workflows/lint.yml

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

31+
- uses: actions/cache@v2
32+
with:
33+
path: ~/.cache/pip
34+
# This is like the example but we use ``*requirements.txt`` rather
35+
# than ``requirements.txt`` because we have multiple requirements
36+
# files.
37+
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
38+
restore-keys: |
39+
${{ runner.os }}-pip-
40+
3141
- name: "Install dependencies"
3242
run: |
3343
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: ~/.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

0 commit comments

Comments
 (0)