Skip to content

Commit 914e08a

Browse files
authored
build: add pip and tox caching to CI workflows (#158)
1 parent 28d6d64 commit 914e08a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ jobs:
8686
if: ${{ steps.counter.outputs.count > 0 }}
8787
with:
8888
python-version: '3.9'
89+
cache: 'pip'
90+
cache-dependency-path: 'setup.py'
8991
- run: pip install mypy==1.5.1
9092
if: ${{ steps.counter.outputs.count > 0 }}
9193
- run: mypy ${{ steps.filter.outputs.python_files }} --follow-imports=silent --ignore-missing-imports

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ jobs:
2929
uses: actions/setup-python@v4
3030
with:
3131
python-version: ${{ matrix.py }}
32+
cache: 'pip'
33+
cache-dependency-path: 'setup.py'
34+
- name: Cache tox environments
35+
uses: actions/cache@v3
36+
with:
37+
path: .tox
38+
key: tox-${{ matrix.os }}-${{ matrix.py }}-${{ hashFiles('tox.ini', 'setup.py') }}
39+
restore-keys: |
40+
tox-${{ matrix.os }}-${{ matrix.py }}-
3241
- name: Install tox
3342
run: python -m pip install tox
3443
- name: Setup test suite

0 commit comments

Comments
 (0)