Skip to content

Commit

Permalink
CI: use -e install for tox + add docker-compose for isolated Rabbit…
Browse files Browse the repository at this point in the history
…MQ (#4375)

* Using `pip install -e .` for tox runs improves startup time for tests
   by preventing unnecessary copy of files.

* The docker-compose yml file allows to set up an isolated RabbitMQ
   instance for local CI testing.
  • Loading branch information
chrisjsewell authored Oct 1, 2020
1 parent 02248cf commit 29331b5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .ci/docker-rabbitmq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# A small configuration for use in local CI testing,
# if you wish to control the rabbitmq used.

# Simply install docker, then run:
# $ docker-compose -f .ci/docker-rabbitmq.yml up -d

# and to power down, after testing:
# $ docker-compose -f .ci/docker-rabbitmq.yml down

# you can monitor rabbitmq use at: http://localhost:15672

version: '3.4'

services:

rabbit:
image: rabbitmq:3.8.3-management
container_name: aiida-rmq
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- '5672:5672'
- '15672:15672'
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 5
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ legacy_tox_ini = """
[tox]
envlist = py37-django
[testenv]
usedevelop=True
[testenv:py{36,37,38}-{django,sqla}]
deps =
py36: -rrequirements/requirements-py-3.6.txt
Expand Down

0 comments on commit 29331b5

Please sign in to comment.