-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
63 lines (57 loc) · 1.3 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
kind: pipeline
type: kubernetes
name: test
steps:
- name: install
image: python:3.10-slim
volumes: &cache-volume
- name: pip-cache
path: /root/.local
- name: poetry-cache
path: /root/.cache
commands:
- pip install --user --no-warn-script-location -U poetry
- python -m poetry install
- name: flake8
image: python:3.10-slim
volumes: *cache-volume
commands:
- python -m poetry run flake8 .
depends_on:
- install
- name: mypy
image: python:3.10-slim
volumes: *cache-volume
commands:
- python -m poetry run mypy src
depends_on:
- install
- name: publish
image: python:3.10-slim
volumes: *cache-volume
environment:
POETRY_HTTP_BASIC_BUZZVIL_USERNAME:
from_secret: pypi_username
POETRY_HTTP_BASIC_BUZZVIL_PASSWORD:
from_secret: pypi_password
commands:
- python -m poetry config repositories.buzzvil http://pypi.buzzvil-internal.com/
- python -m poetry publish --repository buzzvil --build
depends_on:
- flake8
- mypy
when:
branch:
- master
event:
- tag
volumes:
- name: pip-cache
temp: {}
- name: poetry-cache
temp: {}
trigger:
ref:
- refs/heads/master
- refs/pull/**
- refs/tags/v*