diff --git a/.drone.yml b/.drone.yml index 4b9b80e..da1f53d 100644 --- a/.drone.yml +++ b/.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 \ No newline at end of file +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 \ No newline at end of file diff --git a/tox.ini b/tox.ini index da952cd..42a7907 100644 --- a/tox.ini +++ b/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://}