cic-utils/.drone.yml

56 lines
987 B
YAML
Raw Normal View History

2022-02-03 08:49:00 +01:00
---
################
# Test #
################
kind: pipeline
2022-02-23 08:01:52 +01:00
name: test
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-22 14:07:49 +01:00
- name: ci
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-03 08:49:00 +01:00
volumes:
2022-02-22 14:07:49 +01:00
- name: poetry_cache
host:
path: /tmp/cache/drone/pypoetry
---
kind: pipeline
name: publish
type: docker
steps:
- name: cd
image: python:3.7.2
commands:
2022-02-23 08:01:52 +01:00
- git fetch
2022-02-22 14:07:49 +01:00
- pip install --no-cache-dir poetry
- poetry install
2022-02-23 08:01:52 +01:00
- poetry run semantic-release publish
2022-02-22 14:07:49 +01:00
environment:
LOGLEVEL: info
2022-02-23 08:01:52 +01:00
GITEA_TOKEN:
2022-02-22 14:07:49 +01:00
from_secret: gitea_token
volumes:
- name: poetry_cache
path: /root/.cache/pypoetry
depends_on:
2022-02-23 08:01:52 +01:00
- test
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