Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WiZeYAR committed Nov 17, 2024
1 parent 707289f commit 1b020d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
services:
rabbitmq:
image: rabbitmq:3.13.6
ports: ["5672:5672"]
ports: ["5672"]

steps:
- uses: actions/checkout@v4
Expand All @@ -44,4 +44,6 @@ jobs:
run: poetry install --all-extras

- name: Run tests
env:
AMQP_URI: amqp://localhost:${{ job.services.rabbitmq.ports[5672] }}
run: poetry run pytest
3 changes: 3 additions & 0 deletions tests/core/amqp/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from aio_pika import connect_robust
from aio_pika.pool import Pool
from aio_pika.abc import AbstractRobustConnection
from os import environ
import pytest
import pytest_asyncio

Expand All @@ -44,6 +45,8 @@ async def consumer2(amqp_pool: AmqpPool) -> Consumer:

@pytest.fixture(scope="session")
def amqp_uri() -> str:
if (env_uri := environ.get("AMQP_URI")) is not None:
return env_uri
return "amqp://guest:guest@rabbitmq/"


Expand Down

0 comments on commit 1b020d8

Please sign in to comment.