Compare commits

...

1 Commits

Author SHA1 Message Date
Erik Johnston
aa2fe082ae Allow testing old deps with postgres 2021-01-22 10:48:56 +00:00
2 changed files with 8 additions and 4 deletions

View File

@@ -9,5 +9,3 @@ apt-get update
apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox
export LANG="C.UTF-8"
exec tox -e py35-old,combine

10
tox.ini
View File

@@ -101,7 +101,7 @@ usedevelop=true
# A test suite for the oldest supported versions of Python libraries, to catch
# any uses of APIs not available in them.
[testenv:py35-old]
[testenv:py35-{old,old-postgres}]
skip_install=True
deps =
# Ensure a version of setuptools that supports Python 3.5 is installed.
@@ -114,11 +114,17 @@ deps =
coverage
coverage-enable-subprocess==1.0
setenv =
postgres: SYNAPSE_POSTGRES = 1
commands =
# 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 -d"\n" pip install'
#
# Also strip out psycopg2 unless we need it.
/bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" -e "/psycopg2/d" -e "s/pyopenssl==16.0.0/pyopenssl==17.0.0/" | xargs -d"\n" pip install'
postgres: /bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" | grep -F "psycopg2" | xargs -d"\n" pip install'
# Install Synapse itself. This won't update any libraries.
pip install -e ".[test]"