cic-cli/.drone.yml

61 lines
1.2 KiB
YAML

---
################
# Test #
################
kind: pipeline
name: default
type: docker
steps:
# Run tests against Python with pytest
- name: test
image: python:3.8
commands:
# Install dependencies
- pip install poetry
- poetry install
- poetry run pylint cic
- poetry run pytest
environment:
LOGLEVEL: info
volumes:
- name: poetry_cache
path: /root/.cache/pypoetry
- name: pip_cache
path: /root/.cache/pip
- name: publish
image: python:3.8
commands:
# Install dependencies
- pip install poetry
- poetry install
- poetry run semantic-release publish
depends_on:
- test
when:
branch:
- master
environment:
LOGLEVEL: info
GIT_SSL_NO_VERIFY: 1
REPOSITORY_USERNAME: __token__
REPOSITORY_PASSWORD:
from_secret: pypi_token
GITEA_TOKEN:
from_secret: gitea_token
volumes:
- name: poetry_cache
path: /root/.cache/pypoetry
- name: pip_cache
path: /root/.cache/pip
volumes:
- name: poetry_cache
host:
path: /tmp/cache/drone/pypoetry
- name: pip_cache
host:
path: /tmp/cache/drone/pip