"Migrate drone.yml to 1.x [SKIP CI]."

This commit is contained in:
Sergio Morillo 2021-02-13 01:02:16 +01:00
parent 66628e1f0f
commit b0b7d0bc34
2 changed files with 170 additions and 49 deletions

View File

@ -1,51 +1,173 @@
pipeline: kind: pipeline
tox: name: py37-sqlite
image: ${IMAGE}
environment: steps:
- CFLAGS=-O0 - name: tox
- DB_CACHE=/cache image: python:3.7
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE pull: if-not-exists
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ environment:
commands: CFLAGS: -O0
- pip install tox DB_CACHE: /cache
- tox -e "${TOXENV}-${DATABASE}" TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
volumes: commands:
- /var/lib/cache:/root/.cache - pip install tox
notify: - tox -e "py37-sqlite"
image: drillster/drone-email volumes:
- name: cache
path: /root/.cache
- name: notify
image: drillster/drone-email
pull: if-not-exists
settings:
from: drone@datalifeit.es from: drone@datalifeit.es
skip_verify: true skip_verify: true
secrets: [ email_host, email_port ] host:
when: from_secret: email_host
status: [ changed, failure ] 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: services:
postgresql: - name: postgresql
image: postgres:12 image: postgres
pull: if-not-exists pull: if-not-exists
environment: environment:
- POSTGRES_HOST_AUTH_METHOD=trust POSTGRES_HOST_AUTH_METHOD: trust
when:
matrix:
DATABASE: postgresql
matrix: volumes:
include: - name: cache
- IMAGE: python:3.6 host:
TOXENV: py36 path: /var/lib/cache
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36 ---
DATABASE: postgresql kind: pipeline
- IMAGE: python:3.7 name: py38-postgresql
TOXENV: py37
DATABASE: sqlite steps:
- IMAGE: python:3.7 - name: tox
TOXENV: py37 image: python:3.8
DATABASE: postgresql pull: if-not-exists
- IMAGE: python:3.8 environment:
TOXENV: py38 CFLAGS: -O0
DATABASE: sqlite DB_CACHE: /cache
- IMAGE: python:3.8 TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
TOXENV: py38 POSTGRESQL_URI: postgresql://postgres@postgresql:5432/
DATABASE: postgresql 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

View File

@ -1,12 +1,11 @@
[tox] [tox]
envlist = {py36,py37,py38}-{sqlite,postgresql},pypy3-{sqlite,postgresql} envlist = {py37,py38}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
[testenv] [testenv]
commands = {envpython} setup.py test commands = {envpython} setup.py test
deps = deps =
{py36,py37,py38}-postgresql: psycopg2 >= 2.5 {py37,py38}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5 pypy3-postgresql: psycopg2cffi >= 2.5
{py36}-sqlite: sqlitebck
setenv = setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}