Skip to content

Commit dde9627

Browse files
committed
Add IBM MQ GitHub Actions coverage
1 parent 7ea5117 commit dde9627

4 files changed

Lines changed: 50 additions & 5 deletions

File tree

.github/workflows/pr_tests.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,42 @@ jobs:
456456
if-no-files-found: error
457457
include-hidden-files: true
458458

459+
test-mq-real:
460+
if: github.event.pull_request.draft == false
461+
needs:
462+
- test-basic
463+
runs-on: ubuntu-latest
464+
steps:
465+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
466+
with:
467+
persist-credentials: false
468+
- name: Start MQ test environment
469+
run: docker compose up -d --build faststream ibmmq ibmmq_ha2
470+
- name: Test
471+
run: >
472+
docker compose exec -T faststream
473+
uv run pytest --cov --cov-report=
474+
-vv
475+
tests/brokers/mq
476+
tests/asyncapi/mq
477+
tests/examples/mq
478+
tests/docs/mq
479+
tests/prometheus/mq
480+
tests/opentelemetry/mq
481+
tests/mypy/mq.py
482+
- name: Rename coverage file
483+
run: mkdir coverage && mv .coverage coverage/.coverage.mq-py
484+
- name: Store coverage files
485+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
486+
with:
487+
name: .coverage.mq-py
488+
path: coverage
489+
if-no-files-found: error
490+
include-hidden-files: true
491+
- name: Stop MQ test environment
492+
if: always()
493+
run: docker compose down -v
494+
459495
coverage-combine:
460496
if: github.event.pull_request.draft == false
461497
needs:
@@ -467,6 +503,7 @@ jobs:
467503
- test-rabbit-real
468504
- test-nats-real
469505
- test-redis-real
506+
- test-mq-real
470507
runs-on: ubuntu-latest
471508

472509
steps:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ COPY ./faststream/__init__.py /src/faststream/__init__.py
3131

3232
WORKDIR /src
3333

34-
RUN uv sync --group dev
34+
RUN uv sync --group dev --group mq-dev
3535

3636
ENV PATH="/src/.venv/bin:$PATH"

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ cli = [
8888
prometheus = ["prometheus-client>=0.20.0,<0.30.0"]
8989

9090
[dependency-groups]
91-
optionals = ["faststream[rabbit,mq,kafka,confluent,nats,redis,otel,cli,prometheus]"]
91+
optionals = ["faststream[rabbit,kafka,confluent,nats,redis,otel,cli,prometheus]"]
92+
93+
mq-dev = ["faststream[mq]"]
9294

9395
docs = [
9496
"mkdocs-material==9.7.1",
@@ -153,6 +155,7 @@ testing = [
153155

154156
dev = [
155157
{include-group = "optionals"},
158+
{include-group = "mq-dev"},
156159
{include-group = "lint"},
157160
{include-group = "testing"},
158161
{include-group = "docs"},

uv.lock

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)