forked from genialis/resolwe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
129 lines (117 loc) · 5 KB
/
.travis.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Global Travis CI step definitions that will be used by all jobs unless
# explicitly overriden in the jobs.include matrix.
language: python
# We need to be able to install packages.
sudo: required
python: "3.6"
services:
- docker
- redis-server
addons:
# NOTE: We need to use the postgresql addon since the default PostgreSQL
# service provided on Trusty machines is PostgreSQL 9.2.
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
before_install:
# NOTE: We need to manually reconfigure PostgreSQL 10 since Travis CI doesn't
# provide standard configuration out-of-the-box.
# For more details, see:
# https://github.com/travis-ci/travis-ci/issues/8537#issuecomment-416467506
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf
- sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf
- sudo service postgresql restart
# NOTE: We need to manually install ElasticSearch since we want to control
# the exact version we use instead of relying on the version shipped by
# Travis CI's python image.
- curl -sSL -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.10.deb
- sudo dpkg -i --force-confnew elasticsearch-5.6.10.deb
- sudo service elasticsearch restart
install: pip install tox
script: tox -e $TOX_ENV
after_success:
- pip install codecov
- codecov -e TOX_ENV
# Build stages.
jobs:
include:
- stage: test
env:
- TOX_ENV=py36
# Set environment variables with information how to use the required
# services.
- RESOLWE_POSTGRESQL_USER=postgres
- RESOLWE_POSTGRESQL_PORT=5432
- RESOLWE_ES_PORT=9200
- RESOLWE_REDIS_PORT=6379
# NOTE: We need to disable SECCOMP as it is not supported on Travis CI.
- RESOLWE_DOCKER_DISABLE_SECCOMP=1
# NOTE: We undo almost all global Travis CI step definitions to ensure the
# following Tox environments are run without access to any service.
- stage: test
env: TOX_ENV=docs
services: []
addons: {}
before_install: skip
after_success: skip
- stage: test
env: TOX_ENV=linters
services: []
addons: {}
before_install: skip
after_success: skip
- stage: test
env: TOX_ENV=packaging
services: []
addons: {}
before_install: skip
after_success: skip
# NOTE: We undo many global Travis CI step definitions to ensure the
# following Tox environment only has access to the PostgreSQL service.
- stage: test
env:
- TOX_ENV=migrations
# Set environment variables with information how to use the PostgreSQL
# service.
- RESOLWE_POSTGRESQL_USER=postgres
- RESOLWE_POSTGRESQL_PORT=5432
services: []
before_install:
# NOTE: We need to manually reconfigure PostgreSQL 10 since Travis CI
# doesn't provide standard configuration out-of-the-box.
# For more details, see:
# https://github.com/travis-ci/travis-ci/issues/8537#issuecomment-416467506
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf
- sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf
- sudo service postgresql restart
after_success: skip
# NOTE: We undo all the global Travis CI step definitions to ensure
# building of source and wheel distributions is performed in a clean
# environment.
- stage: release
services: []
addons: {}
before_install: skip
# Project uses setuptools_scm to determine the version from a SCM tag.
install: pip install setuptools_scm
script: skip
# NOTE: Due to the way Travis CI currently works, setting
# 'after_success: skip' would also result in skipping the deploy step.
# A work-around is to execute a dummy echo command.
# More info at: https://github.com/travis-ci/travis-ci/issues/8337.
after_success: echo "Skipping..."
deploy:
provider: pypi
user: genialis-bot
password:
secure: "Z3shLiQqooqYevBBKzlJba0jPtB1bIfogsoTBHzTVV72w3SZtWzZrPYE0CYsMHRf8218DC0jNEK/0WEKWISmhJK3LAL04MjcmJVHGwR+4jaq5YS+I/U5NsdwmPkWzy4Vto856jjSKGMyeCDmQ/P8cMBvWppaMBKRhnR50F7UPueWnvfPCC9KKWZ3oAH+P+8tWHZxg9ehDG1uLvgmvcPe+RDmrClyZPw+A+QeUJ1zHtyDMfHRucsoorjqoG8KaCC8wE08oeuwDaQkSsq2r5et0Mp6edQsKZo86ZaTskDl4UcrxyOB7K8yK7UMwj1rD3uHGlgM6B1zTSOADFkLwJizK3GgIjBowVmPRr9zNQ7mMNXVPXIIMxEmkAksl8Ix5zWkOYmS0QzOdMAs6QgeK7zA+uqkTKDstfs8hd9M3xGtEdXwOsF2jzLvqj/UeqWSBdoDWQug16LxVz/lFZzj52QAf659eldQ4dLQHqtMa31ENlkoCZXNpPmq/m+8CErZPPBZVIbyBNw0vJwTSlH11E4WdDEGd4Z4dOWfBv5/XEvJuUHNUF2RDyii2iBEzybBmvt272xTYOv8XpfYB4nKJt+ci65pSp4lCgIQXF2wgAkLd39imMk9eymgys/llrR13W/Uqmd5iOR2J21Gh1uvkzOR+Oor6N7a9278Ii7OHJ7uzKI="
distributions: sdist bdist_wheel
on:
# Enable deploying tags. By default, Travis CI only deploys from the
# master branch.
tags: true
# Only build releases for tags starting with a Semantic Versioning 2.0
# compatible version.
if: tag =~ ^\d+\.\d+\.\d+