cic-utils/.drone.yml

56 lines
987 B
YAML

---
################
# Test #
################
kind: pipeline
name: test
type: docker
steps:
# Run tests against Python with pytest
- name: ci
image: python:3.7.2
commands:
# Install dependencies
- pip install poetry
- poetry install
- poetry run pytest
environment:
LOGLEVEL: info
volumes:
- name: poetry_cache
path: /root/.cache/pypoetry
volumes:
- name: poetry_cache
host:
path: /tmp/cache/drone/pypoetry
---
kind: pipeline
name: publish
type: docker
steps:
- name: cd
image: python:3.7.2
commands:
- git fetch
- pip install --no-cache-dir poetry
- poetry install
- poetry run semantic-release publish
environment:
LOGLEVEL: info
GITEA_TOKEN:
from_secret: gitea_token
volumes:
- name: poetry_cache
path: /root/.cache/pypoetry
depends_on:
- test
volumes:
- name: poetry_cache
host:
path: /tmp/cache/drone/pypoetry