cic-utils/.drone.yml

61 lines
1.2 KiB
YAML
Raw Normal View History

2022-02-03 08:49:00 +01:00
---
################
# Test #
################
kind: pipeline
2022-02-23 08:15:12 +01:00
name: default
2022-02-22 14:07:49 +01:00
type: docker
2022-02-03 08:49:00 +01:00
steps:
# Run tests against Python with pytest
2022-02-23 08:15:12 +01:00
- name: test
2022-02-03 08:49:00 +01:00
image: python:3.7.2
commands:
# Install dependencies
2022-02-22 14:07:49 +01:00
- pip install poetry
- poetry install
- poetry run pytest
2022-02-03 08:49:00 +01:00
environment:
LOGLEVEL: info
volumes:
2022-02-22 14:07:49 +01:00
- name: poetry_cache
path: /root/.cache/pypoetry
2022-02-25 07:39:38 +01:00
- name: pip_cache
path: /root/.cache/pip
2022-02-23 08:15:12 +01:00
- name: publish
2022-02-22 14:07:49 +01:00
image: python:3.7.2
commands:
2022-02-23 08:15:12 +01:00
# Install dependencies
2022-02-23 08:16:31 +01:00
- pip install poetry
- poetry install
2022-02-23 08:01:52 +01:00
- poetry run semantic-release publish
2022-02-23 08:15:12 +01:00
depends_on:
- test
when:
branch:
- main
2022-02-22 14:07:49 +01:00
environment:
LOGLEVEL: info
2022-02-23 08:42:57 +01:00
GIT_SSL_NO_VERIFY: 1
2022-02-25 08:13:27 +01:00
REPOSITORY_USERNAME: __token__
REPOSITORY_PASSWORD:
from_secret: pypi_token
2022-02-23 08:01:52 +01:00
GITEA_TOKEN:
2022-02-22 14:07:49 +01:00
from_secret: gitea_token
2022-02-23 08:15:12 +01:00
2022-02-22 14:07:49 +01:00
volumes:
- name: poetry_cache
path: /root/.cache/pypoetry
2022-02-25 07:39:38 +01:00
- name: pip_cache
path: /root/.cache/pip
2022-02-22 14:07:49 +01:00
volumes:
- name: poetry_cache
2022-02-03 08:49:00 +01:00
host:
2022-02-23 08:01:52 +01:00
path: /tmp/cache/drone/pypoetry
2022-02-25 07:39:38 +01:00
- name: pip_cache
host:
path: /tmp/cache/drone/pip