From 5ce7edb10133d12a34ceaecdf5f31a48854b0b2a Mon Sep 17 00:00:00 2001 From: seroy Date: Sat, 20 Jan 2018 17:53:14 +0300 Subject: [PATCH] add tox --- .scrutinizer.yml | 2 +- README.rst | 2 +- requirements/test.txt | 2 +- tox.ini | 12 ++++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 tox.ini diff --git a/.scrutinizer.yml b/.scrutinizer.yml index c04e805..cd2e8e0 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -29,7 +29,7 @@ build: - 'pip install coverage --force-reinstall -U' override: - - command: python3 -m pytest --cov=psqlextra + command: tox coverage: file: '.coverage' format: 'py-cc' diff --git a/README.rst b/README.rst index 67053d0..613ac8f 100644 --- a/README.rst +++ b/README.rst @@ -166,7 +166,7 @@ Working with the code .. code-block:: bash - λ py.test + λ tox 5. Run the benchmarks: diff --git a/requirements/test.txt b/requirements/test.txt index 23a6c85..e95e56a 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,6 +1,5 @@ -r base.txt -Django==2.0.1 psycopg2==2.7.3.2 pylint==1.8.1 pylint-common==0.2.5 @@ -15,3 +14,4 @@ pytest==3.3.2 pytest-benchmark==3.1.1 pytest-django==3.1.2 pytest-cov==2.5.1 +tox==2.9.1 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..1fa1267 --- /dev/null +++ b/tox.ini @@ -0,0 +1,12 @@ +[tox] +envlist = py35-dj{111,20} + +[testenv] +deps = + dj111: Django>=1.11,<1.12 + dj20: Django>=2.0,<2.1 + -rrequirements/test.txt +setenv = + DJANGO_SETTINGS_MODULE=settings +passenv = DATABASE_URL +commands = python -m pytest --cov=psqlextra