relstorage/.travis.yml

90 lines
2.1 KiB
YAML
Raw Normal View History

language: python
sudo: false
services:
- mysql
- postgresql
- memcached
addons:
# Use postgresql 9.3 to get commit-lock testing
2016-07-01 15:44:55 -07:00
# Use postgresql 9.4 to get support for BLOB SQL functions for pg8000
# Use postgresql 9.5 to get support for INSERT ON CONFLICT UPDATE
2018-01-31 08:57:41 -08:00
# Use postgresql 9.6 ... just because
postgresql: "9.6"
2017-01-24 11:44:59 -08:00
matrix:
include:
- python: 2.7
env:
- ENV=cmysqlconnector
- RS_MY_DRIVER="C MySQL Connector/Python"
2017-01-24 15:18:29 -08:00
- python: 3.6
env: ENV=mysqlconnector
# PyPy 5.8.0 is knonwn to be broken. Check again
# when Travis updates.
#- python: pypy
# env: ENV=mysqlconnector
2017-01-24 15:18:29 -08:00
- python: 3.6
2017-01-24 11:44:59 -08:00
env: ENV=mysql
- python: 3.5
env: ENV=mysql
- python: 2.7
env:
- ENV=mysql
- OLDZODB=true
2018-01-31 08:57:41 -08:00
- python: pypy
2017-01-24 11:44:59 -08:00
env: ENV=mysql
- python: 3.5
env: ENV=pymysql
2017-01-24 11:44:59 -08:00
- python: 2.7
env: ENV=pymysql
- python: 2.7
env: ENV=umysqldb
2017-01-24 11:44:59 -08:00
2018-01-31 08:57:41 -08:00
- env: ENV=postgres
2017-01-24 11:44:59 -08:00
python: 2.7
2018-01-31 08:57:41 -08:00
- env: ENV=postgres
python: pypy
- env: ENV=postgres
2017-01-24 11:44:59 -08:00
python: 3.6
2018-01-31 08:57:41 -08:00
- env: ENV=pypostgres
2017-01-24 11:44:59 -08:00
python: 2.7
2018-01-31 08:57:41 -08:00
- env: ENV=pypostgres
2017-01-24 11:44:59 -08:00
python: 3.5
fast_finish: true
script:
# coverage slows PyPy down from 2minutes to 12+.
Initial support for pg8000 The major difference from psycopg2/cffi is that it doesn't have native lobject support. This is easily worked around, but this draft is not complete because it doesn't support chunks. Some refactoring will be required to elegantly handle this. Two minor differences: - It doesn't support multiple statements in a single `cursor.execute()` call. Apparently it turns all statements into prepared statements, because the error is from the server. Easily worked around and unlikely to be a perfomance difference. - It handles transaction isolation levels like most other drivers, in SQL. This could be handled more elegantly too. One thing: The server spits out lots of "WARNING: not in a transaction". If I enable statement logging, I see every `commit` immediately followed by a `rollback`, which generates the warning. I'm not sure if that's just us, or something the driver is doing differently (e.g, maybe psycopg2/cffi always follows `commit` with `begin`? and then when we try to `rollback` we're already in a transaction?). Annoying but harmless. Still, would like to figure it out though. Testing this pure-python driver on Python 3 also revealed a lot of connection leaks, many of which I've fixed, but there are probably more. This should be a win for PyPy. See also zopefoundation/ZODB#78. The testing matrix is expanded to test the pure-python drivers on CPython too and to test pg8000. (Travis will be the first time I run psycopg2 tests; hope I didn't break anything!) Fixes #85.
2016-07-01 15:10:36 -07:00
# But don't run the pymysql/pypy tests twice.
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pylint --rcfile=.pylintrc relstorage -f parseable -r n; fi
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then python -m relstorage.tests.alltests -v; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage run -m relstorage.tests.alltests -v; fi
after_success:
- coveralls
notifications:
email: false
before_install:
- python --version
install:
2016-06-24 05:32:39 -07:00
- pip install -U pip setuptools
- pip install -U tox coveralls
- pip install -U "pylint>=1.7.1"
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then pip install -U python-memcached; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install -U pylibmc cffi; fi
- pip install -U -e ".[test]"
- .travis/setup-$ENV.sh
- if [[ $OLDZODB == true ]]; then .travis/setup-oldzodb.sh; fi
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log