Skip to content

Commit e623511

Browse files
authored
ci: cache dependencies for faster builds (#1497)
* ci: cache dependencies for faster builds * ci: cache for mypy and black --------- Co-authored-by: Jordan Woods <[email protected]>
1 parent 2ff9697 commit e623511

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/meta-checks.yml

+14
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414

1515
steps:
16+
- name: Get pip cache dir
17+
id: pip-cache
18+
shell: bash
19+
run: |
20+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
21+
22+
- name: cache
23+
uses: actions/cache@v4
24+
with:
25+
path: ${{ steps.pip-cache.outputs.dir }}
26+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
27+
restore-keys: |
28+
${{ runner.os }}-${{ matrix.python-version }}-pip-
29+
1630
- uses: actions/checkout@v4
1731

1832
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}

.github/workflows/run-tests.yml

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
21+
- name: Get pip cache dir
22+
id: pip-cache
23+
shell: bash
24+
run: |
25+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
26+
27+
- name: cache
28+
uses: actions/cache@v4
29+
with:
30+
path: ${{ steps.pip-cache.outputs.dir }}
31+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
32+
restore-keys: |
33+
${{ runner.os }}-${{ matrix.python-version }}-pip-
34+
2135
- uses: actions/checkout@v4
2236

2337
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}

0 commit comments

Comments
 (0)