diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000000..a4d2595986 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,9 @@ +image: python2.7 +env: + - POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/ + - MYSQL_URI=mysql://root@127.0.0.1:3306/ +script: + - pip install tox + - tox -e sqlite,postgresql +services: + - postgres diff --git a/setup.py b/setup.py index bf67120467..b117686460 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,10 @@ tests_require = [get_require_version('proteus')] for dep in ['sale', 'purchase', 'account_invoice', 'sale_supply_drop_shipment']: tests_require.append(get_require_version('trytond_%s' % dep)) +dependency_links = [] +if minor_version % 2: + # Add development index for testing with proteus + dependency_links.append('https://trydevpi.tryton.org/') setup(name=name, version=version, @@ -95,6 +99,7 @@ setup(name=name, ], license='GPL-3', install_requires=requires, + dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..e213af00e6 --- /dev/null +++ b/tox.ini @@ -0,0 +1,16 @@ +[tox] +envlist = py27-{sqlite,postgresql,mysql} + +[testenv] +commands = {envpython} setup.py test +deps = + postgresql: psycopg2 >= 2.0 + mysql: MySQL-python +setenv = + sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} + postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} + mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://} + sqlite: DB_NAME={env:SQLITE_NAME::memory:} + postgresql: DB_NAME={env:POSTGRESQL_NAME:test} + mysql: DB_NAME={env:MYSQL_NAME:test} +install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}