cic-utils/.drone.yml

60 lines
1.1 KiB
YAML
Raw Normal View History

2022-02-03 08:49:00 +01:00
---
################
# Test #
################
kind: pipeline
name: run_tests
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:
# Install dependencies
- 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
when:
branch:
- master
event:
- push
depends_on:
- run_tests
volumes:
- name: poetry_cache
2022-02-03 08:49:00 +01:00
host:
2022-02-22 14:07:49 +01:00
path: /tmp/cache/drone/pypoetry