forked from danihodovic/celery-exporter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
62 lines (56 loc) · 1.33 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
---
kind: pipeline
type: docker
name: default
volumes:
- name: cache
host:
path: /tmp/drone-cache
workspace:
path: /drone/dht/
steps:
- name: restore-cache
image: meltwater/drone-cache:dev
pull: true
settings:
backend: "filesystem"
restore: true
cache_key: '{{ .Repo.Name }}_{{ checksum "poetry.lock" }}'
archive_format: "gzip"
mount:
- '.virtualenv'
volumes:
- name: cache
path: /tmp/cache
- name: install-dependencies
depends_on: [restore-cache]
image: python:3.9.1
commands:
# If the venv dir is not cached create it
- '[ ! -d ".virualenv" ] && python -m venv .virtualenv'
- . .virtualenv/bin/activate
- pip install poetry
- poetry install
- name: test
depends_on: [install-dependencies]
image: python:3.9.1
commands:
- . .virtualenv/bin/activate
- black . --check
- isort --check-only .
- pylint src
- pytest --cov
- name: rebuild-cache
depends_on: [install-dependencies]
image: meltwater/drone-cache:dev
pull: true
settings:
backend: "filesystem"
rebuild: true
cache_key: '{{ .Repo.Name }}_{{ checksum "poetry.lock" }}'
archive_format: "gzip"
mount:
- '.virtualenv'
volumes:
- name: cache
path: /tmp/cache