diff --git a/.github/workflows/ocr-integration.yml b/.github/workflows/ocr-integration.yml new file mode 100644 index 0000000..98f7ae4 --- /dev/null +++ b/.github/workflows/ocr-integration.yml @@ -0,0 +1,34 @@ +name: OCR integration + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + ocr-integration: + name: Real PaddleOCR integration + runs-on: ubuntu-latest + timeout-minutes: 20 + defaults: + run: + working-directory: services/ocr-service + env: + DEBUG: 'false' + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + cache-dependency-path: services/ocr-service/requirements.txt + + - name: Install dependencies + run: python -m pip install --upgrade pip && python -m pip install -r requirements.txt + + - name: Run real OCR integration tests + run: python -m pytest -m integration --runintegration --runslow -v diff --git a/services/ocr-service/README.md b/services/ocr-service/README.md index 90d1b81..e0bab4b 100644 --- a/services/ocr-service/README.md +++ b/services/ocr-service/README.md @@ -252,6 +252,19 @@ pytest --cov=app --cov-report=html pytest tests/test_engine.py -v ``` +### Real OCR Integration + +The deterministic suite intentionally does not download PaddleOCR models. The +real engine test is isolated in the `OCR integration` workflow and can be +started manually from GitHub Actions. Locally, run: + +```bash +pytest -m integration --runintegration --runslow -v +``` + +This test is slower and requires model downloads; it is not a required pull +request check. + ### Manual Testing ```bash