Skip to content

Commit b184691

Browse files
julian-rischclaude
andcommitted
feat(docling-serve): add integration tests triggered via Docker in CI
- Add `ghcr.io/docling-project/docling-serve` service to the workflow - Add `Run integration tests` and `Store combined coverage` steps - Add push-to-main trigger so integration tests run on merge - Add `integration-cov-append-retry` hatch script to pyproject.toml - Update README combined coverage badge from N/A to actual badge Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a8a385f commit b184691

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

.github/workflows/docling_serve.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
- "integrations/docling_serve/**"
99
- "!integrations/docling_serve/*.md"
1010
- ".github/workflows/docling_serve.yml"
11+
push:
12+
branches:
13+
- main
14+
paths:
15+
- "integrations/docling_serve/**"
16+
- "!integrations/docling_serve/*.md"
17+
- ".github/workflows/docling_serve.yml"
1118

1219
defaults:
1320
run:
@@ -31,6 +38,17 @@ jobs:
3138
os: [ubuntu-latest]
3239
python-version: ["3.10", "3.14"]
3340

41+
services:
42+
docling-serve:
43+
image: ghcr.io/docling-project/docling-serve:latest
44+
ports:
45+
- 5001:5001
46+
options: >-
47+
--health-cmd "curl -f http://localhost:5001/health || exit 1"
48+
--health-interval 10s
49+
--health-timeout 5s
50+
--health-retries 10
51+
3452
steps:
3553
- uses: actions/checkout@v4
3654

@@ -51,7 +69,7 @@ jobs:
5169

5270
- name: Store unit tests coverage
5371
id: coverage_comment
54-
if: matrix.python-version == '3.10' && runner.os == 'Linux'
72+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name != 'schedule'
5573
uses: py-cov-action/python-coverage-comment-action@7188638f871f721a365d644f505d1ff3df20d683 # v3.40
5674
with:
5775
GITHUB_TOKEN: ${{ github.token }}
@@ -67,7 +85,21 @@ jobs:
6785
name: coverage-comment-docling_serve
6886
path: python-coverage-comment-action-docling_serve.txt
6987

88+
- name: Run integration tests
89+
run: hatch run test:integration-cov-append-retry
90+
91+
- name: Store combined coverage
92+
if: github.event_name == 'push'
93+
uses: py-cov-action/python-coverage-comment-action@7188638f871f721a365d644f505d1ff3df20d683 # v3.40
94+
with:
95+
GITHUB_TOKEN: ${{ github.token }}
96+
COVERAGE_PATH: integrations/docling_serve
97+
SUBPROJECT_ID: docling_serve-combined
98+
MINIMUM_GREEN: 90
99+
MINIMUM_ORANGE: 60
100+
70101
- name: Run unit tests with lowest direct dependencies
102+
if: github.event_name != 'push'
71103
run: |
72104
hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
73105
hatch -e test env run -- uv pip install -r requirements_lowest_direct.txt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Please check out our [Contribution Guidelines](CONTRIBUTING.md) for all the deta
3939
| [cometapi-haystack](integrations/cometapi/) | Generator | [![PyPI - Version](https://img.shields.io/pypi/v/cometapi-haystack.svg)](https://pypi.org/project/cometapi-haystack) | [![Test / cometapi](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/cometapi.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/cometapi.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-cometapi/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-cometapi/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-cometapi-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-cometapi-combined/htmlcov/index.html) |
4040
| [deepeval-haystack](integrations/deepeval/) | Evaluator | [![PyPI - Version](https://img.shields.io/pypi/v/deepeval-haystack.svg)](https://pypi.org/project/deepeval-haystack) | [![Test / deepeval](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/deepeval.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/deepeval.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-deepeval/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-deepeval/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-deepeval-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-deepeval-combined/htmlcov/index.html) |
4141
| [docling-haystack](integrations/docling/) | Converter | [![PyPI - Version](https://img.shields.io/pypi/v/docling-haystack.svg)](https://pypi.org/project/docling-haystack) | [![Test / docling](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/docling.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/docling.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-docling/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-docling/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-docling-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-docling-combined/htmlcov/index.html) |
42-
| [docling-serve-haystack](integrations/docling_serve/) | Converter | [![PyPI - Version](https://img.shields.io/pypi/v/docling-serve-haystack.svg)](https://pypi.org/project/docling-serve-haystack) | [![Test / docling_serve](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/docling_serve.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/docling_serve.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-docling_serve/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-docling_serve/htmlcov/index.html) | N/A |
42+
| [docling-serve-haystack](integrations/docling_serve/) | Converter | [![PyPI - Version](https://img.shields.io/pypi/v/docling-serve-haystack.svg)](https://pypi.org/project/docling-serve-haystack) | [![Test / docling_serve](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/docling_serve.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/docling_serve.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-docling_serve/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-docling_serve/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-docling_serve-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-docling_serve-combined/htmlcov/index.html) |
4343
| [dspy-haystack](integrations/dspy/) | Generator | [![PyPI - Version](https://img.shields.io/pypi/v/dspy-haystack.svg)](https://pypi.org/project/dspy-haystack) | [![Test / dspy](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/dspy.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/dspy.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-dspy/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-dspy/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-dspy-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-dspy-combined/htmlcov/index.html) |
4444
| [e2b-haystack](integrations/e2b/) | Tool | [![PyPI - Version](https://img.shields.io/pypi/v/e2b-haystack.svg)](https://pypi.org/project/e2b-haystack) | [![Test / e2b](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/e2b.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/e2b.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-e2b/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-e2b/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-e2b-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-e2b-combined/htmlcov/index.html) |
4545
| [elasticsearch-haystack](integrations/elasticsearch/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/elasticsearch-haystack.svg)](https://pypi.org/project/elasticsearch-haystack) | [![Test / elasticsearch](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/elasticsearch.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/elasticsearch.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-elasticsearch/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-elasticsearch/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-elasticsearch-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-elasticsearch-combined/htmlcov/index.html) |

integrations/docling_serve/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ unit = 'pytest -m "not integration" {args:tests}'
6868
integration = 'pytest -m "integration" {args:tests}'
6969
all = 'pytest {args:tests}'
7070
unit-cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x -m "not integration" {args:tests}'
71+
integration-cov-append-retry = 'pytest --cov=haystack_integrations --cov-append --reruns 3 --reruns-delay 30 -x -m "integration" {args:tests}'
7172
types = "mypy -p haystack_integrations.components.converters.docling_serve {args}"
7273

7374
[tool.mypy]

0 commit comments

Comments
 (0)