Skip to content

Commit c16b8b9

Browse files
committed
Caching Docling models in GitHub Actions, and not using pytest-xdist for docling tests
1 parent 7db43cc commit c16b8b9

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,23 @@ jobs:
106106
enable-cache: true
107107
python-version: ${{ matrix.python-version }}
108108
- run: uv sync
109-
- run: uv run pytest -n auto packages
109+
- run: uv run pytest -n auto packages --ignore=packages/paper-qa-docling
110+
env:
111+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
112+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
113+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
114+
SEMANTIC_SCHOLAR_API_KEY: ${{ secrets.SEMANTIC_SCHOLAR_API_KEY }}
115+
CROSSREF_API_KEY: ${{ secrets.CROSSREF_API_KEY }}
116+
- name: Cache Docling and EasyOCR models
117+
id: cache-models
118+
uses: actions/cache@v4
119+
with:
120+
path: |
121+
~/.cache/docling
122+
~/.EasyOCR
123+
key: ${{ runner.os }}-docling-easyocr-${{ hashFiles('uv.lock') }}
124+
restore-keys: ${{ runner.os }}-docling-easyocr-
125+
- run: uv run pytest packages/paper-qa-docling # Don't use `-n auto` to avoid race condition with EasyOCR model downloads
110126
env:
111127
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
112128
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

0 commit comments

Comments
 (0)