summary refs log tree commit diff
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini65
1 files changed, 56 insertions, 9 deletions
diff --git a/tox.ini b/tox.ini
index 1bce10a4ce..463a34d137 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = packaging, py35, py36, py37, check_codestyle, check_isort
+envlist = packaging, py35, py36, py37, py38, check_codestyle, check_isort
 
 [base]
 basepython = python3.7
@@ -102,6 +102,15 @@ commands =
 
     {envbindir}/coverage run "{envbindir}/trial"  {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}
 
+[testenv:benchmark]
+deps =
+    {[base]deps}
+    pyperf
+setenv =
+    SYNAPSE_POSTGRES = 1
+commands =
+    python -m synmark {posargs:}
+
 [testenv:packaging]
 skip_install=True
 deps =
@@ -114,15 +123,17 @@ skip_install = True
 basepython = python3.6
 deps =
     flake8
-    black
+    flake8-comprehensions
+    black==19.10b0  # We pin so that our tests don't start failing on new releases of black.
 commands =
     python -m black --check --diff .
-    /bin/sh -c "flake8 synapse tests scripts scripts-dev scripts/hash_password scripts/register_new_matrix_user scripts/synapse_port_db synctl {env:PEP8SUFFIX:}"
+    /bin/sh -c "flake8 synapse tests scripts scripts-dev synctl {env:PEP8SUFFIX:}"
+    {toxinidir}/scripts-dev/config-lint.sh
 
 [testenv:check_isort]
 skip_install = True
 deps = isort
-commands = /bin/sh -c "isort -c -df -sp setup.cfg -rc synapse tests"
+commands = /bin/sh -c "isort -c -df -sp setup.cfg -rc synapse tests scripts-dev scripts"
 
 [testenv:check-newsfragment]
 skip_install = True
@@ -157,16 +168,52 @@ commands=
     coverage html
 
 [testenv:mypy]
-basepython = python3.7
 skip_install = True
 deps =
     {[base]deps}
-    mypy
+    mypy==0.750
     mypy-zope
-    typeshed
 env =
     MYPYPATH = stubs/
 extras = all
-commands = mypy --show-traceback \
+commands = mypy \
+            synapse/api \
+            synapse/appservice \
+            synapse/config \
+            synapse/event_auth.py \
+            synapse/events/spamcheck.py \
+            synapse/federation \
+            synapse/handlers/auth.py \
+            synapse/handlers/cas_handler.py \
+            synapse/handlers/directory.py \
+            synapse/handlers/oidc_handler.py \
+            synapse/handlers/presence.py \
+            synapse/handlers/room_member.py \
+            synapse/handlers/room_member_worker.py \
+            synapse/handlers/saml_handler.py \
+            synapse/handlers/sync.py \
+            synapse/handlers/ui_auth \
+            synapse/http/server.py \
+            synapse/http/site.py \
             synapse/logging/ \
-            synapse/config/
+            synapse/metrics \
+            synapse/module_api \
+            synapse/push/pusherpool.py \
+            synapse/push/push_rule_evaluator.py \
+            synapse/replication \
+            synapse/rest \
+            synapse/spam_checker_api \
+            synapse/storage/data_stores/main/ui_auth.py \
+            synapse/storage/database.py \
+            synapse/storage/engines \
+            synapse/storage/util \
+            synapse/streams \
+            synapse/util/caches/stream_change_cache.py \
+            tests/replication \
+            tests/test_utils \
+            tests/rest/client/v2_alpha/test_auth.py \
+            tests/util/test_stream_change_cache.py
+
+# To find all folders that pass mypy you run:
+#
+#   find synapse/* -type d -not -name __pycache__ -exec bash -c "mypy '{}' > /dev/null"  \; -print