Skip to content

Commit 2f62dbf

Browse files
HumanBean17claude
andcommitted
fix(ci): add HF_TOKEN and model caching, remove uv.lock
- Add HF_TOKEN environment variable to CI workflow for authenticated HuggingFace downloads - Add HuggingFace model caching to avoid repeated downloads and HTTP 429 errors - Set TRANSFORMERS_CACHE and HF_HOME environment variables for consistent model paths - Remove uv.lock that was accidentally committed in rollback commit - Add uv.lock to .gitignore to prevent future commits This fixes the CI failure caused by HuggingFace rate limiting when multiple tests load the sentence-transformers model. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e2f4672 commit 2f62dbf

3 files changed

Lines changed: 15 additions & 2258 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,22 @@ jobs:
5151
- name: Check generated edge navigation doc
5252
if: steps.changes.outputs.code == 'true'
5353
run: python scripts/generate_edge_navigation.py --check
54+
- name: Cache HuggingFace models
55+
if: steps.changes.outputs.code == 'true'
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/.cache/huggingface
59+
key: hf-${{ hashFiles('**/pyproject.toml') }}-v1
60+
restore-keys: |
61+
hf-${{ hashFiles('**/pyproject.toml') }}-
62+
hf-
5463
- name: Run tests
5564
if: steps.changes.outputs.code == 'true'
5665
env:
5766
JAVA_CODEBASE_RAG_RUN_HEAVY: "0"
67+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
68+
TRANSFORMERS_CACHE: ~/.cache/huggingface
69+
HF_HOME: ~/.cache/huggingface
5870
run: pytest tests -v
5971
- name: Skip tests (docs-only)
6072
if: steps.changes.outputs.code != 'true'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ cocoindex_java_lance.db/
5656
.env
5757
.env.*
5858
tmp/
59+
60+
# uv lock file (should not be committed)
61+
uv.lock

0 commit comments

Comments
 (0)