51 lines
934 B
YAML
51 lines
934 B
YAML
---
|
|
################
|
|
# Test #
|
|
################
|
|
|
|
kind: pipeline
|
|
name: default
|
|
type: docker
|
|
|
|
steps:
|
|
# Run tests against Python with pytest
|
|
- name: test
|
|
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
|
|
|
|
- name: publish
|
|
image: python:3.7.2
|
|
commands:
|
|
# Install dependencies
|
|
- pip install poetry
|
|
- poetry install
|
|
- poetry run semantic-release publish
|
|
depends_on:
|
|
- test
|
|
when:
|
|
branch:
|
|
- main
|
|
environment:
|
|
LOGLEVEL: info
|
|
GIT_SSL_NO_VERIFY: 1
|
|
GITEA_TOKEN:
|
|
from_secret: gitea_token
|
|
|
|
volumes:
|
|
- name: poetry_cache
|
|
path: /root/.cache/pypoetry
|
|
volumes:
|
|
- name: poetry_cache
|
|
host:
|
|
path: /tmp/cache/drone/pypoetry
|