mirror of
https://gitlab.com/datalifeit/trytond-staff_workplace
synced 2023-12-14 04:42:58 +01:00
"Migrate drone.yml to 1.x [SKIP CI]."
This commit is contained in:
parent
0800ad6d02
commit
d1d0c13340
2 changed files with 170 additions and 49 deletions
214
.drone.yml
214
.drone.yml
|
@ -1,51 +1,173 @@
|
|||
pipeline:
|
||||
tox:
|
||||
image: ${IMAGE}
|
||||
environment:
|
||||
- CFLAGS=-O0
|
||||
- DB_CACHE=/cache
|
||||
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
|
||||
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
|
||||
commands:
|
||||
- pip install tox
|
||||
- tox -e "${TOXENV}-${DATABASE}"
|
||||
volumes:
|
||||
- /var/lib/cache:/root/.cache
|
||||
notify:
|
||||
image: drillster/drone-email
|
||||
kind: pipeline
|
||||
name: py37-sqlite
|
||||
|
||||
steps:
|
||||
- name: tox
|
||||
image: python:3.7
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
CFLAGS: -O0
|
||||
DB_CACHE: /cache
|
||||
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
|
||||
commands:
|
||||
- pip install tox
|
||||
- tox -e "py37-sqlite"
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /root/.cache
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
pull: if-not-exists
|
||||
settings:
|
||||
from: drone@datalifeit.es
|
||||
skip_verify: true
|
||||
secrets: [ email_host, email_port ]
|
||||
when:
|
||||
status: [ changed, failure ]
|
||||
host:
|
||||
from_secret: email_host
|
||||
port:
|
||||
from_secret: email_port
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /var/lib/cache
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: py38-sqlite
|
||||
|
||||
steps:
|
||||
- name: tox
|
||||
image: python:3.8
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
CFLAGS: -O0
|
||||
DB_CACHE: /cache
|
||||
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
|
||||
commands:
|
||||
- pip install tox
|
||||
- tox -e "py38-sqlite"
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /root/.cache
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
pull: if-not-exists
|
||||
settings:
|
||||
from: drone@datalifeit.es
|
||||
skip_verify: true
|
||||
host:
|
||||
from_secret: email_host
|
||||
port:
|
||||
from_secret: email_port
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /var/lib/cache
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: py37-postgresql
|
||||
|
||||
steps:
|
||||
- name: tox
|
||||
image: python:3.7
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
CFLAGS: -O0
|
||||
DB_CACHE: /cache
|
||||
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
|
||||
POSTGRESQL_URI: postgresql://postgres@postgresql:5432/
|
||||
commands:
|
||||
- pip install tox
|
||||
- tox -e "py37-postgresql"
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /root/.cache
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
pull: if-not-exists
|
||||
settings:
|
||||
from: drone@datalifeit.es
|
||||
skip_verify: true
|
||||
host:
|
||||
from_secret: email_host
|
||||
port:
|
||||
from_secret: email_port
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
services:
|
||||
postgresql:
|
||||
image: postgres:12
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
when:
|
||||
matrix:
|
||||
DATABASE: postgresql
|
||||
- name: postgresql
|
||||
image: postgres
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- IMAGE: python:3.6
|
||||
TOXENV: py36
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.6
|
||||
TOXENV: py36
|
||||
DATABASE: postgresql
|
||||
- IMAGE: python:3.7
|
||||
TOXENV: py37
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.7
|
||||
TOXENV: py37
|
||||
DATABASE: postgresql
|
||||
- IMAGE: python:3.8
|
||||
TOXENV: py38
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.8
|
||||
TOXENV: py38
|
||||
DATABASE: postgresql
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /var/lib/cache
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: py38-postgresql
|
||||
|
||||
steps:
|
||||
- name: tox
|
||||
image: python:3.8
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
CFLAGS: -O0
|
||||
DB_CACHE: /cache
|
||||
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
|
||||
POSTGRESQL_URI: postgresql://postgres@postgresql:5432/
|
||||
commands:
|
||||
- pip install tox
|
||||
- tox -e "py38-postgresql"
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /root/.cache
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
pull: if-not-exists
|
||||
settings:
|
||||
from: drone@datalifeit.es
|
||||
skip_verify: true
|
||||
host:
|
||||
from_secret: email_host
|
||||
port:
|
||||
from_secret: email_port
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
services:
|
||||
- name: postgresql
|
||||
image: postgres
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /var/lib/cache
|
5
tox.ini
5
tox.ini
|
@ -1,12 +1,11 @@
|
|||
[tox]
|
||||
envlist = {py36,py37,py38}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
|
||||
envlist = {py37,py38}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands = {envpython} setup.py test
|
||||
deps =
|
||||
{py36,py37,py38}-postgresql: psycopg2 >= 2.5
|
||||
{py37,py38}-postgresql: psycopg2 >= 2.5
|
||||
pypy3-postgresql: psycopg2cffi >= 2.5
|
||||
{py36}-sqlite: sqlitebck
|
||||
setenv =
|
||||
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
|
||||
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
|
||||
|
|
Loading…
Reference in a new issue