Update to drone 0.8

This commit is contained in:
Sergio Morillo 2018-06-22 12:18:33 +02:00
parent 2b8cb1a67c
commit 002eb0fcd7
5 changed files with 75 additions and 22 deletions

View File

@ -1,9 +1,57 @@
image: python:all
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 "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
clone:
hg:
image: plugins/hg
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- TOX_TESTENV_PASSENV=CFLAGS
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
notify:
image: drillster/drone-email
from: drone@datalife.com.es
skip_verify: true
secrets: [ email_host, email_port ]
when:
status: [ changed, failure ]
services:
- postgres
postgresql:
image: postgres
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:2.7
TOXENV: py27
DATABASE: sqlite
- IMAGE: python:2.7
TOXENV: py27
DATABASE: postgresql
- IMAGE: python:3.4
TOXENV: py34
DATABASE: sqlite
- IMAGE: python:3.4
TOXENV: py34
DATABASE: postgresql
- IMAGE: python:3.5
TOXENV: py35
DATABASE: sqlite
- IMAGE: python:3.5
TOXENV: py35
DATABASE: postgresql
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql

View File

@ -1,5 +1,5 @@
include INSTALL
include README
include README.md
include TODO
include COPYRIGHT
include CHANGELOG

View File

View File

@ -1,6 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part sale_lot module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
@ -21,6 +19,7 @@ def read(fname):
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
def get_require_version(name):
if minor_version % 2:
require = '%s >= %s.%s.dev0, < %s.%s'
@ -30,6 +29,7 @@ def get_require_version(name):
major_version, minor_version + 1)
return require
config = ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
@ -40,8 +40,8 @@ version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'nantic_sale_lot'
download_url = 'https://bitbucket.org/nantic/trytond-sale_lot'
name = 'datalife_sale_lot'
download_url = 'https://bitbucket.org/datalife_sco/trytond-sale_lot'
requires = []
for dep in info.get('depends', []):
@ -50,7 +50,12 @@ for dep in info.get('depends', []):
requires.append(get_require_version('%s_%s' % (prefix, dep)))
requires.append(get_require_version('trytond'))
tests_require = []
tests_require = [get_require_version('proteus')]
series = '%s.%s' % (major_version, minor_version)
if minor_version % 2:
branch = 'default'
else:
branch = series
dependency_links = []
if minor_version % 2:
# Add development index for testing with proteus
@ -58,11 +63,11 @@ if minor_version % 2:
setup(name=name,
version=version,
description='Tryton Sale Lot Module',
long_description=read('README'),
author='NaN·tic',
author_email='info@nan-tic.com',
url='http://www.nan-tic.com/',
description='Tryton sale lot Module',
long_description=read('README.md'),
author='Datalife',
author_email='info@datalife.com.es',
url='https://bitbucket.org/datalife_sco/',
download_url=download_url,
keywords='',
package_dir={'trytond.modules.sale_lot': '.'},

View File

@ -1,10 +1,10 @@
[tox]
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
envlist = {py27,py34,py35,py36}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
[testenv]
commands = {envpython} setup.py test
deps =
{py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
{py27,py34,py35,py36}-postgresql: psycopg2 >= 2.5
pypy-postgresql: psycopg2cffi >= 2.5
mysql: MySQL-python
setenv =
@ -14,4 +14,4 @@ setenv =
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}
install_command = pip install --pre --process-dependency-links {opts} {packages}