summary refs log tree commit diff
path: root/tox.ini
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-09-27 23:21:54 +1000
committerGitHub <noreply@github.com>2018-09-27 23:21:54 +1000
commitb3064532d005e08a3f5ec0c2a2decf688208f5e6 (patch)
tree1c3650106b8a12bbf2a69766d98b2f34e9311cfb /tox.ini
parentMerge pull request #3961 from matrix-org/neilj/lock_mau_upserts (diff)
downloadsynapse-b3064532d005e08a3f5ec0c2a2decf688208f5e6.tar.xz
Run our oldest supported configuration in CI (#3952)
Diffstat (limited to '')
-rw-r--r--tox.ini20
1 files changed, 20 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index e4db563b4b..87b5e4782d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -64,6 +64,26 @@ setenv =
     {[base]setenv}
     SYNAPSE_POSTGRES = 1
 
+# A test suite for the oldest supported versions of Python libraries, to catch
+# any uses of APIs not available in them.
+[testenv:py27-old]
+skip_install=True
+deps =
+    # Old automat version for Twisted
+    Automat == 0.3.0
+
+    mock
+    lxml
+commands =
+    /usr/bin/find "{toxinidir}" -name '*.pyc' -delete
+    # Make all greater-thans equals so we test the oldest version of our direct
+    # dependencies, but make the pyopenssl 17.0, which can work against an
+    # OpenSSL 1.1 compiled cryptography (as older ones don't compile on Travis).
+    /bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" -e "s/psycopg2==2.6//" -e "s/pyopenssl==16.0.0/pyopenssl==17.0.0/" | xargs pip install'
+    # Install Synapse itself. This won't update any libraries.
+    pip install -e .
+    {envbindir}/trial {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}
+
 [testenv:py35]
 usedevelop=true