mirror of
https://gitlab.com/datalifeit/trytond-edocument_edifact
synced 2023-12-14 05:42:56 +01:00
Update to drone 0.8
This commit is contained in:
parent
c062e4d587
commit
77182d75bd
65
.drone.yml
65
.drone.yml
|
@ -1,9 +1,58 @@
|
|||
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:
|
||||
- python tests/netrc2hgrc.py
|
||||
- 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
|
||||
|
|
|
@ -3,7 +3,7 @@ datalife_edocument_edifact
|
|||
|
||||
The edocument_edifact module of the Tryton application platform.
|
||||
|
||||
[![Build Status](https://drone.io/bitbucket.org/datalife_sco/trytond-edocument_edifact/status.png)](https://drone.io/bitbucket.org/datalife_sco/trytond-edocument_edifact/latest)
|
||||
[![Build Status](http://drone.datalife.com.es:8050/api/badges/datalife_sco/trytond-edocument_edifact/status.svg)](http://drone.datalife.com.es:8050/datalife_sco/trytond-edocument_edifact)
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
|
31
setup.py
31
setup.py
|
@ -11,7 +11,10 @@ try:
|
|||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
MODULE2PREFIX = {}
|
||||
MODULE2PREFIX = {
|
||||
'incoterm': 'datalife',
|
||||
'stock_unit_load': 'datalife'
|
||||
}
|
||||
|
||||
|
||||
def read(fname):
|
||||
|
@ -19,6 +22,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'
|
||||
|
@ -28,6 +32,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'))
|
||||
|
@ -48,15 +53,33 @@ for dep in info.get('depends', []):
|
|||
requires.append(get_require_version('%s_%s' % (prefix, dep)))
|
||||
requires.append(get_require_version('trytond'))
|
||||
|
||||
tests_require = []
|
||||
dependency_links = []
|
||||
tests_require = [get_require_version('proteus')]
|
||||
series = '%s.%s' % (major_version, minor_version)
|
||||
if minor_version % 2:
|
||||
branch = 'default'
|
||||
else:
|
||||
branch = series
|
||||
dependency_links = [
|
||||
('hg+https://bitbucket.org/datalife_sco/'
|
||||
'trytond-incoterm@%(branch)s'
|
||||
'#egg=datalife_incoterm-%(series)s' % {
|
||||
'branch': branch,
|
||||
'series': series,
|
||||
}),
|
||||
('hg+https://bitbucket.org/datalife_sco/'
|
||||
'trytond-stock_unit_load@%(branch)s'
|
||||
'#egg=datalife_stock_unit_load-%(series)s' % {
|
||||
'branch': branch,
|
||||
'series': series,
|
||||
})
|
||||
]
|
||||
if minor_version % 2:
|
||||
# Add development index for testing with proteus
|
||||
dependency_links.append('https://trydevpi.tryton.org/')
|
||||
|
||||
setup(name=name,
|
||||
version=version,
|
||||
description='Tryton Edocument Edifact Module',
|
||||
description='Tryton edocument edifact Module',
|
||||
long_description=read('README.md'),
|
||||
author='Datalife',
|
||||
author_email='info@datalife.com.es',
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -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 --find-links https://trydevpi.tryton.org/ --process-dependency-links {opts} {packages}
|
||||
|
|
Loading…
Reference in a new issue