Skip to content

Commit 58c087f

Browse files
authored
Added cache in github actions to speed up CI (#549)
1 parent 2e9adce commit 58c087f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ jobs:
1515
uses: actions/setup-python@v2
1616
with:
1717
python-version: ${{ matrix.python-version }}
18+
- uses: actions/cache@v2
19+
with:
20+
path: ~/.cache/pip
21+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-lint-${{ hashFiles('./dev-requirements.txt') }}
22+
restore-keys: |
23+
${{ runner.os }}-pip-${{ matrix.python-version }}-lint-
1824
- name: Install dependencies
1925
run: |
2026
pip install -U pip setuptools wheel
@@ -36,6 +42,12 @@ jobs:
3642
uses: actions/setup-python@v2
3743
with:
3844
python-version: ${{ matrix.python-version }}
45+
- uses: actions/cache@v2
46+
with:
47+
path: ~/.cache/pip
48+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-test-${{ hashFiles('./dev-requirements.txt') }}
49+
restore-keys: |
50+
${{ runner.os }}-pip-${{ matrix.python-version }}-test-
3951
- name: Install dependencies
4052
run: |
4153
pip install -U pip setuptools wheel
@@ -58,6 +70,12 @@ jobs:
5870
uses: actions/setup-python@v2
5971
with:
6072
python-version: ${{ matrix.python-version }}
73+
- uses: actions/cache@v2
74+
with:
75+
path: ~/.cache/pip
76+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.django-version }}-typecheck-${{ hashFiles('./dev-requirements.txt') }}
77+
restore-keys: |
78+
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.django-version }}-typecheck-
6179
- name: Install dependencies
6280
run: |
6381
pip install -U pip setuptools wheel

0 commit comments

Comments
 (0)