This repository has been archived by the owner on Jul 9, 2019. It is now read-only.
/
.drone.yml
68 lines (61 loc) · 1.75 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
64
65
66
67
clone:
git:
image: plugins/git:1
depth: 50
tags: true
pipeline:
restore-cache:
image: drillster/drone-volume-cache
restore: true
mount:
- .cache
volumes:
- /tmp/cache:/cache
build:
image: python:3-alpine
commands:
- apk -U add gcc g++ make pkgconfig git postgresql-dev libffi libffi-dev python3-dev
- pip install --upgrade pip setuptools
- pip install --cache-dir=.cache flake8
- pip install --cache-dir=.cache black
- pip install --cache-dir=.cache cython
- pip install --cache-dir=.cache -r requirements.txt
- python setup.py install
- black --check .
- flake8 .
- cp tests/config_tests.py config.py
- python setup.py test
migrations:
image: python:3-alpine
commands:
- apk -U add gcc g++ make pkgconfig git postgresql-dev libffi libffi-dev python3-dev postgresql-client
- pip install --upgrade pip setuptools
- pip install --cache-dir=.cache flake8
- pip install --cache-dir=.cache black
- pip install --cache-dir=.cache cython
- pip install --cache-dir=.cache -r requirements.txt
- python setup.py install
- psql -U postgres -h database -w -c 'CREATE DATABASE ahrl'
- cp config.py.sample config.py
- flask db upgrade
rebuild-cache:
image: drillster/drone-volume-cache
rebuild: true
mount:
- .cache
volumes:
- /tmp/cache:/cache
notify:
image: plugins/slack
channel: gitea
secrets:
- SLACK_WEBHOOK
when:
event: [ push, tag, pull_request ]
status: [ changed, failure, success ]
services:
database:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=ahrl_test