mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 09:09:27 -05:00
Run unit tests against python 3.7 (#4677)
* Run unit tests against python 3.7 ... so that we span the full range of our supported python versions * Switch to xenial * fix psql fail * pep8 etc want python 3.6
This commit is contained in:
parent
c003450057
commit
c594cc8076
22
.travis.yml
22
.travis.yml
@ -1,4 +1,4 @@
|
|||||||
sudo: false
|
dist: xenial
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
@ -54,23 +54,23 @@ matrix:
|
|||||||
python: 3.5
|
python: 3.5
|
||||||
env: TOX_ENV=py35,codecov TRIAL_FLAGS="-j 2"
|
env: TOX_ENV=py35,codecov TRIAL_FLAGS="-j 2"
|
||||||
|
|
||||||
- name: "py3.6 / sqlite"
|
- name: "py3.7 / sqlite"
|
||||||
python: 3.6
|
python: 3.7
|
||||||
env: TOX_ENV=py36,codecov TRIAL_FLAGS="-j 2"
|
env: TOX_ENV=py37,codecov TRIAL_FLAGS="-j 2"
|
||||||
|
|
||||||
- name: "py3.6 / postgres9.4"
|
- name: "py3.7 / postgres9.4"
|
||||||
python: 3.6
|
python: 3.7
|
||||||
addons:
|
addons:
|
||||||
postgresql: "9.4"
|
postgresql: "9.4"
|
||||||
env: TOX_ENV=py36-postgres TRIAL_FLAGS="-j 4"
|
env: TOX_ENV=py37-postgres TRIAL_FLAGS="-j 4"
|
||||||
services:
|
services:
|
||||||
- postgresql
|
- postgresql
|
||||||
|
|
||||||
- name: "py3.6 / postgres9.5"
|
- name: "py3.7 / postgres9.5"
|
||||||
python: 3.6
|
python: 3.7
|
||||||
addons:
|
addons:
|
||||||
postgresql: "9.5"
|
postgresql: "9.5"
|
||||||
env: TOX_ENV=py36-postgres,codecov TRIAL_FLAGS="-j 4"
|
env: TOX_ENV=py37-postgres,codecov TRIAL_FLAGS="-j 4"
|
||||||
services:
|
services:
|
||||||
- postgresql
|
- postgresql
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ matrix:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
# this just logs the postgres version we will be testing against (if any)
|
# this just logs the postgres version we will be testing against (if any)
|
||||||
- psql -At -U postgres -c 'select version();'
|
- psql -At -U postgres -c 'select version();' || true
|
||||||
|
|
||||||
- pip install tox
|
- pip install tox
|
||||||
|
|
||||||
|
1
changelog.d/4677.misc
Normal file
1
changelog.d/4677.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Run unit tests against python 3.7.
|
29
tox.ini
29
tox.ini
@ -3,7 +3,6 @@ envlist = packaging, py27, py36, pep8, check_isort
|
|||||||
|
|
||||||
[base]
|
[base]
|
||||||
deps =
|
deps =
|
||||||
Twisted>=17.1
|
|
||||||
mock
|
mock
|
||||||
python-subunit
|
python-subunit
|
||||||
junitxml
|
junitxml
|
||||||
@ -38,6 +37,7 @@ whitelist_externals =
|
|||||||
|
|
||||||
setenv =
|
setenv =
|
||||||
{[base]setenv}
|
{[base]setenv}
|
||||||
|
postgres: SYNAPSE_POSTGRES = 1
|
||||||
|
|
||||||
passenv = *
|
passenv = *
|
||||||
|
|
||||||
@ -47,8 +47,6 @@ commands =
|
|||||||
sh -c 'echo "import coverage; coverage.process_startup()" > {envsitepackagesdir}/../sitecustomize.py'
|
sh -c 'echo "import coverage; coverage.process_startup()" > {envsitepackagesdir}/../sitecustomize.py'
|
||||||
{envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}
|
{envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}
|
||||||
|
|
||||||
[testenv:py27]
|
|
||||||
|
|
||||||
# As of twisted 16.4, trial tries to import the tests as a package (previously
|
# As of twisted 16.4, trial tries to import the tests as a package (previously
|
||||||
# it loaded the files explicitly), which means they need to be on the
|
# it loaded the files explicitly), which means they need to be on the
|
||||||
# pythonpath. Our sdist doesn't include the 'tests' package, so normally it
|
# pythonpath. Our sdist doesn't include the 'tests' package, so normally it
|
||||||
@ -72,14 +70,7 @@ commands =
|
|||||||
# )
|
# )
|
||||||
usedevelop=true
|
usedevelop=true
|
||||||
|
|
||||||
[testenv:py27-postgres]
|
|
||||||
usedevelop=true
|
|
||||||
deps =
|
|
||||||
{[base]deps}
|
|
||||||
psycopg2
|
|
||||||
setenv =
|
|
||||||
{[base]setenv}
|
|
||||||
SYNAPSE_POSTGRES = 1
|
|
||||||
|
|
||||||
# A test suite for the oldest supported versions of Python libraries, to catch
|
# A test suite for the oldest supported versions of Python libraries, to catch
|
||||||
# any uses of APIs not available in them.
|
# any uses of APIs not available in them.
|
||||||
@ -101,22 +92,6 @@ commands =
|
|||||||
pip install -e .
|
pip install -e .
|
||||||
{envbindir}/trial {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}
|
{envbindir}/trial {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}
|
||||||
|
|
||||||
[testenv:py35]
|
|
||||||
usedevelop=true
|
|
||||||
|
|
||||||
[testenv:py36]
|
|
||||||
usedevelop=true
|
|
||||||
|
|
||||||
[testenv:py36-postgres]
|
|
||||||
usedevelop=true
|
|
||||||
deps =
|
|
||||||
{[base]deps}
|
|
||||||
psycopg2
|
|
||||||
setenv =
|
|
||||||
{[base]setenv}
|
|
||||||
SYNAPSE_POSTGRES = 1
|
|
||||||
|
|
||||||
|
|
||||||
[testenv:packaging]
|
[testenv:packaging]
|
||||||
skip_install=True
|
skip_install=True
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
Reference in New Issue
Block a user