From da48aea6fe4a0a03b9ef11f4e90376fce2d1b528 Mon Sep 17 00:00:00 2001 From: Matt Rasband Date: Sun, 28 Jul 2019 11:20:10 -0600 Subject: [PATCH 1/2] Volume mount the tox directory fixes #375 This makes it so the local volumes being mounted into the docker container via compose do not include `.tox`. --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 267d3c02..c98f4794 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ services: - "8000:8000" volumes: - "${PWD}:/app" + - /app/.tox command: gunicorn pyslackersweb:app_factory --access-logfile - --bind=0.0.0.0:8000 --worker-class=aiohttp.GunicornWebWorker --reload redis: From e3aa06fd176927e70c1c5f3c63336e8e36177453 Mon Sep 17 00:00:00 2001 From: Matt Rasband Date: Sun, 28 Jul 2019 11:22:20 -0600 Subject: [PATCH 2/2] Scope tox commands to not accidentally pick up unrelated python files/tests/etc --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 8858642e..32390469 100644 --- a/tox.ini +++ b/tox.ini @@ -4,15 +4,15 @@ skipsdist = true [testenv] deps = -r requirements/testing.txt -commands = python -m pytest --verbose --cov=pyslackersweb/ --cov-report=term-missing --junit-xml={envdir}/artifacts/test-results.xml +commands = python -m pytest --verbose --cov=pyslackersweb/ --cov-report=term-missing --junit-xml={envdir}/artifacts/test-results.xml tests/ [testenv:lint] deps = -r requirements/testing.txt commands = - pylint pyslackersweb - mypy . --ignore-missing-imports + pylint ./pyslackersweb + mypy ./pyslackersweb --ignore-missing-imports [testenv:fmt] deps = black -commands = black --check . +commands = black --check pyslackersweb/ tests/