forked from vertexproject/synapse
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.drone.yml
74 lines (67 loc) · 2.18 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
68
69
70
71
72
73
74
buildcommands: &runbuild
image: vertexproject/synapse-base-image:${IMAGE_VERSION}
pull: true
secrets:
[ CODECOV_TOKEN ]
commands:
- if [ -n "${SLEEP}" ]; then sleep ${SLEEP}; fi;
- python setup.py install
- pytest -v -s -rs --durations 6 --maxfail 6 -p no:logging ${COVERAGE_ARGS}
- if [ -n "${COVERAGE_ARGS}" ]; then codecov --name ${IMAGE_VERSION} --required; fi;
clone:
git:
image: plugins/git
pull: true
tags: true
backoff: 5
backoff-attempts: 2
matrix:
include:
- TEST_NAME: "Python 34 without coverage."
IMAGE_VERSION: py34
PG_DB: root@database:5432/syn_test
- TEST_NAME: "Python 35 without coverage."
IMAGE_VERSION: py35
PG_DB: root@database:5432/syn_test
SLEEP: 3
- TEST_NAME: "Python 36 with coverage."
IMAGE_VERSION: py36
PG_DB: root@database:5432/syn_test
COVERAGE_ARGS: --cov synapse --no-cov-on-fail
SLEEP: 6
# We are unable to test on Python 3.7 until synapse.async is renamed
# - TEST_NAME: "Python 37 without coverage."
# IMAGE_VERSION: py37
# PG_DB: root@database:5432/syn_test
# SLEEP: 9
pipeline:
pycodestyle:
group: style_checks
image: vertexproject/synapse-docker-testimages:py36
commands:
- pycodestyle --max-line-length=120 --select E111,E101,E201,E202,E203,E221,E222,E223,E224,E225,E226,E227,E228,E231,E241,E242,E251,E303,E304,E502,E711,E712,E713,E714,E721,E741,E742,E743,W191,W291,W293,W292,W391,W602,W603 synapse
- pycodestyle --max-line-length=120 --select E111,E101,E201,E202,E203,E221,E222,E223,E224,E225,E226,E227,E228,E231,E241,E242,E251,E303,E304,E502,E711,E712,E713,E714,E721,E741,E742,E743,W191,W291,W293,W292,W391,W602,W603 scripts
buildpush:
when:
event: [push]
branch:
exclude: [master]
environment:
- SYN_TEST_PG_DB=${PG_DB}
- SYN_TEST_SKIP_LONG=1
<<: *runbuild
buildmaster:
when:
branch:
include: [master]
event: [pull_request, tag, deployment, push]
environment:
- SYN_TEST_PG_DB=${PG_DB}
<<: *runbuild
services:
database:
image: postgres:9.6
pull: true
environment:
- POSTGRES_DB=syn_test
- POSTGRES_USER=root