diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9de25c4..600b536 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,21 +16,21 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Get image metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.DOCKER_IMAGE }} - name: ghcr.io login - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: github.event_name != 'pull_request' with: registry: ghcr.io @@ -53,7 +53,7 @@ jobs: poetry run invoke build - name: Build Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} diff --git a/test/conftest.py b/test/conftest.py index ea53dee..55d591a 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -6,8 +6,8 @@ import asyncio import logging -from collections.abc import Generator from pathlib import Path +from typing import AsyncGenerator, Generator import pytest from asgi_lifespan import LifespanManager @@ -56,7 +56,7 @@ def config(monkeypatch: pytest.MonkeyPatch, cfg = TestConfig( debug=True, mqtt_host='localhost', - mqtt_port=docker_services.port_for('mqtt', 1883), + mqtt_port=docker_services.port_for('eventbus', 1883), redis_host='localhost', redis_port=docker_services.port_for('redis', 6379), victoria_host='localhost', @@ -101,7 +101,7 @@ def app() -> FastAPI: @pytest.fixture -async def manager(app: FastAPI) -> Generator[LifespanManager, None, None]: +async def manager(app: FastAPI) -> AsyncGenerator[LifespanManager, None]: """ AsyncClient does not automatically send ASGI lifespan events to the app https://asgi.readthedocs.io/en/latest/specs/lifespan.html @@ -115,7 +115,7 @@ async def manager(app: FastAPI) -> Generator[LifespanManager, None, None]: @pytest.fixture -async def client(app: FastAPI, manager: LifespanManager) -> Generator[AsyncClient, None, None]: +async def client(app: FastAPI, manager: LifespanManager) -> AsyncGenerator[AsyncClient, None]: """ The default test client for making REST API calls. Using this fixture will also guarantee that lifespan startup has happened. diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 4d36902..e055dc1 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,5 +1,5 @@ services: - mqtt: + eventbus: image: ghcr.io/brewblox/mosquitto:develop ports: - "1883"