Skip to content

Commit b773dcd

Browse files
committed
Cache the HF models in the CI
1 parent ed344d6 commit b773dcd

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,15 @@ jobs:
169169

170170
- run: uv run mcp-run-python example --deps=numpy
171171
- run: uv sync --only-dev
172+
173+
- name: cache HuggingFace models
174+
uses: actions/cache@v4
175+
with:
176+
path: ~/.cache/huggingface
177+
key: hf-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
178+
restore-keys: |
179+
hf-${{ runner.os }}-
180+
172181
- run: uv run ${{ matrix.install.command }} coverage run -m pytest --durations=100 -n auto --dist=loadgroup
173182
env:
174183
COVERAGE_FILE: .coverage/.coverage.${{ matrix.python-version }}-${{ matrix.install.name }}
@@ -206,6 +215,15 @@ jobs:
206215
- run: mkdir .coverage
207216

208217
- run: uv sync --group dev
218+
219+
- name: cache HuggingFace models
220+
uses: actions/cache@v4
221+
with:
222+
path: ~/.cache/huggingface
223+
key: hf-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
224+
restore-keys: |
225+
hf-${{ runner.os }}-
226+
209227
- run: uv run mcp-run-python example --deps=numpy
210228

211229
- run: unset UV_FROZEN
@@ -239,6 +257,14 @@ jobs:
239257
with:
240258
enable-cache: true
241259

260+
- name: cache HuggingFace models
261+
uses: actions/cache@v4
262+
with:
263+
path: ~/.cache/huggingface
264+
key: hf-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
265+
restore-keys: |
266+
hf-${{ runner.os }}-
267+
242268
- run: uv run --all-extras python tests/import_examples.py
243269

244270
coverage:

0 commit comments

Comments
 (0)