diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7ec4545 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.5 + +WORKDIR /usr/src/app + +COPY . . + +RUN pip install -r requirements_dev.txt diff --git a/README.rst b/README.rst index f8bc147..90d66f1 100644 --- a/README.rst +++ b/README.rst @@ -30,6 +30,12 @@ Tests require an instance of RabbitMQ. You can start a new instance using docker Then you can run the tests with ``make test`` (requires ``nose``). +tests using docker-compose +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Start RabbitMQ using ``docker-compose up -d rabbitmq``. When RabbitMQ has started, start the tests using ``docker-compose up --build aioamqp-test`` + + + .. _AMQP 0.9.1 protocol: https://www.rabbitmq.com/amqp-0-9-1-quickref.html .. _PEP 3156: http://www.python.org/dev/peps/pep-3156/ diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..f9d4994 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,17 @@ +version: '3' +services: + aioamqp-test: + build: . + command: ["make", "test"] + depends_on: + - rabbitmq + environment: + - AMQP_HOST=rabbitmq + rabbitmq: + hostname: rabbitmq + image: rabbitmq:3-management + environment: + - RABBITMQ_NODENAME=my-rabbit + ports: + - 15672 + - 5672