diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca75d28504c8233158afe9adc265e8ee8de71cb9..34fbc45cd644c827c1d77672ee662cdd1278a59b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,7 @@ unittest: - coverage run --append -m compile_definitions script: - coverage run --append -m nose2 -F -vv + - COOLAMQP_FORCE_SELECT_LISTENER=1 coverage run --append -m nose2 -F -vv after_script: - mv .coverage .coverage.units variables: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc8754567b2f95b7588373ff3f8d46301a9c8f48..20e2f43cce68f53caaf728aaf513e99ad53a9357 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,10 +4,16 @@ 1.1. If it's cool af, you don't have to. 2. Exhaustive pydoc. 3. If you introduce any gotchas, document them in [docs/](docs/). - +4. We aim to support Python 2.7 as long as possible, keep that in account. ## Unit tests -Tests work using either Travis CI or Vagrant. +Tests work using docker-compose. + +Just +```bash +docker-compose up --build unittest +docker-compose up --build stress_tests +``` If you want to debug things, you have RabbitMQ management enabled on Vagrant. Go to [http://127.0.0.1:15672](http://127.0.0.1:15672) and log in with **user** / **user** diff --git a/docker-compose.yml b/docker-compose.yml index 812b4ef3071816f7789796478b2bf24b26c0e096..741ac5b84464571fcd4244ad7aa3dddc0cb09944 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,15 @@ version: '3.2' services: amqp: - image: rabbitmq + image: rabbitmq:3-management unittest: build: context: . dockerfile: tests/Dockerfile depends_on: - amqp + environment: + AMQP_HOST: "amqp" stress_tests: build: context: . @@ -15,3 +17,5 @@ services: command: python -m stress_tests depends_on: - amqp + environment: + AMQP_HOST: "amqp" diff --git a/setup.py b/setup.py index d39cc732718471eb88190cf754d6646366a8c82c..00144aeb8ee6bc92427cef2609af2ea32aca3c0a 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# coding=UTF-8 from setuptools import setup, find_packages from coolamqp import __version__ @@ -8,7 +6,6 @@ setup(keywords=['amqp', 'rabbitmq', 'client', 'network', 'ha', 'high availabilit version=__version__, packages=find_packages(include=['coolamqp', 'coolamqp.*']), install_requires=['six'], - # per coverage version for codeclimate-reporter tests_require=["pytest", "coverage"], test_suite='nose2.collector.collector', python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',