Skip to content

Commit 3420677

Browse files
authored
Cache Hugging Face tokenizers in CI (#1542)
1 parent f81b6f2 commit 3420677

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ on:
1616
- "packages/**"
1717
- ".github/workflows/test.yml"
1818

19+
env:
20+
HF_HOME: ${{ github.workspace }}/.cache/huggingface
21+
1922
jobs:
2023
test:
2124
name: Verifiers
2225
runs-on: ubuntu-latest
2326
env:
2427
PRIME_API_KEY: ${{ secrets.PRIME_API_KEY }}
2528
PRIME_TEAM_ID: ${{ secrets.PRIME_TEAM_ID }}
29+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
2630
strategy:
2731
fail-fast: false
2832
matrix:
@@ -39,6 +43,14 @@ jobs:
3943
- name: Install uv
4044
uses: astral-sh/setup-uv@v7
4145

46+
- name: Cache Hugging Face tokenizers
47+
uses: actions/cache@v4
48+
with:
49+
path: ${{ env.HF_HOME }}
50+
key: hf-tokenizers-${{ runner.os }}-${{ hashFiles('uv.lock', 'tests/test_renderer_client.py', 'tests/test_renderer_e2e.py') }}
51+
restore-keys: |
52+
hf-tokenizers-${{ runner.os }}-
53+
4254
- name: Install dependencies
4355
run: uv sync
4456

0 commit comments

Comments
 (0)