forked from inveniosoftware/invenio-app-ils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
184 lines (173 loc) · 8.09 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# invenio-app-ils is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
language: python
python: "3.6"
cache:
- pip
services:
- redis
- rabbitmq
notifications:
email: false
env:
global:
- ES6_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.0.tar.gz"
- ES7_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.0-linux-x86_64.tar.gz"
- EXTRAS_COMMON=all,postgresql
####################################################################################################################
# Define common anchors
####################################################################################################################
_common: &common
stage: test
before_install:
- "mkdir /tmp/elasticsearch"
- "wget -O - $ES_URL | tar xz --directory=/tmp/elasticsearch --strip-components=1"
- "/tmp/elasticsearch/bin/elasticsearch --quiet &"
- "travis_retry pip install --upgrade pip setuptools py"
- "travis_retry pip install twine wheel coveralls requirements-builder 'six>=1.12.0'" # pinning min `six` version is required here because some Ubuntu dist in Travis comes with an older version already installed
- "requirements-builder -e $EXTRAS --level=min setup.py > .travis-lowest-requirements.txt"
- "requirements-builder -e $EXTRAS --level=pypi setup.py > .travis-release-requirements.txt"
install:
- "travis_retry pip install -e .[$EXTRAS]"
before_script: "./run-style-checks.sh"
script: skip # to be overridden when declaring the job
after_success: coveralls
_env_release_es6: &env_release_es6
env: REQUIREMENTS=release EXTRAS=$EXTRAS_COMMON,elasticsearch6 ES_URL=$ES6_DOWNLOAD_URL
_env_release_es7: &env_release_es7
env: REQUIREMENTS=release EXTRAS=$EXTRAS_COMMON,elasticsearch7 ES_URL=$ES7_DOWNLOAD_URL
_env_lowest_es6: &env_lowest_es6
env: REQUIREMENTS=lowest EXTRAS=$EXTRAS_COMMON,elasticsearch6 ES_URL=$ES6_DOWNLOAD_URL
_env_lowest_es7: &env_lowest_es7
env: REQUIREMENTS=lowest EXTRAS=$EXTRAS_COMMON,elasticsearch7 ES_URL=$ES7_DOWNLOAD_URL
_run_only_on_master_branch_or_release_tag: &if_master_branch_or_release_tag
if: (branch = master AND type = push) OR tag IS present
jobs:
include:
####################################################################################################################
# RELEASE - ES7
####################################################################################################################
- <<: *common
name: "requirements: release | es: 7 | tests: acquisition"
<<: *env_release_es7
script: "./run-tests.sh acquisition"
- <<: *common
name: "requirements: release | es: 7 | tests: circulation"
<<: *env_release_es7
script: "./run-tests.sh circulation"
- <<: *common
name: "requirements: release | es: 7 | tests: document requests"
<<: *env_release_es7
script: "./run-tests.sh document_requests"
- <<: *common
name: "requirements: release | es: 7 | tests: ill"
<<: *env_release_es7
script: "./run-tests.sh ill"
- <<: *common
name: "requirements: release | es: 7 | tests: ils"
<<: *env_release_es7
script: "./run-tests.sh ils"
####################################################################################################################
# RELEASE - ES6
####################################################################################################################
- <<: *common
name: "requirements: release | es: 6 | tests: acquisition"
<<: *env_release_es6
script: "./run-tests.sh acquisition"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: release | es: 6 | tests: circulation"
<<: *env_release_es6
script: "./run-tests.sh circulation"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: release | es: 6 | tests: document requests"
<<: *env_release_es6
script: "./run-tests.sh document_requests"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: release | es: 6 | tests: ill"
<<: *env_release_es6
script: "./run-tests.sh ill"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: release | es: 6 | tests: ils"
<<: *env_release_es6
script: "./run-tests.sh ils"
<<: *if_master_branch_or_release_tag
####################################################################################################################
# LOWEST - ES7
####################################################################################################################
- <<: *common
name: "requirements: lowest | es: 7 | tests: acquisition"
<<: *env_lowest_es7
script: "./run-tests.sh acquisition"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 7 | tests: circulation"
<<: *env_lowest_es7
script: "./run-tests.sh circulation"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 7 | tests: document requests"
<<: *env_lowest_es7
script: "./run-tests.sh document_requests"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 7 | tests: ill"
<<: *env_lowest_es7
script: "./run-tests.sh ill"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 7 | tests: ils"
<<: *env_lowest_es7
script: "./run-tests.sh ils"
<<: *if_master_branch_or_release_tag
####################################################################################################################
# LOWEST - ES6
####################################################################################################################
- <<: *common
name: "requirements: lowest | es: 6 | tests: acquisition"
<<: *env_lowest_es6
script: "./run-tests.sh acquisition"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 6 | tests: circulation"
<<: *env_lowest_es6
script: "./run-tests.sh circulation"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 6 | tests: document requests"
<<: *env_lowest_es6
script: "./run-tests.sh document_requests"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 6 | tests: ill"
<<: *env_lowest_es6
script: "./run-tests.sh ill"
<<: *if_master_branch_or_release_tag
- <<: *common
name: "requirements: lowest | es: 6 | tests: ils"
<<: *env_lowest_es6
script: "./run-tests.sh ils"
<<: *if_master_branch_or_release_tag
####################################################################################################################
# DEPLOY
####################################################################################################################
- stage: deploy
script: skip
if: tag IS present
deploy:
distributions: sdist bdist_wheel
on:
python: "3.6"
repo: inveniosoftware/invenio-app-ils
tags: true
password:
secure: j6d2Dnh6nDi34MQdrcxdfX3fBIMO8R23UI6lQzjsPrhA2fyQM3aToukJsgnXJjuXRf2o/Gy/jlJNE2vNXAiSeHfk0Uiyw053QtDBS+Shm579281S7nIduvnxSWCRoVRxnr3lnUoHqV0PgI5xvxqZWZLgf2R/HnuB2f3kONxJ/WNN/L9BvRwOMVRbTSu/zh6iuerG5uehCwcQNOHXe1RprITcTKo6iYJ1qPVKkTfUSfM+qzn/IInEvjwncxtt5gs1WTIwoPdeY0/yt6Lr7HZbbWIEgoWJHtJ35X9F1Cb3WugFjRZL1bdv+IR3/qpSZkr9zAHvP+0z+9PgwWDb3NCsjHLzMeEENm5bP49GGBKcmwieVVCoBcsHkyRVznyAIqH80csyfVM29xLpSzfY/e2oVsJM/DX0cOG9K6iv110F6WNRRi4nqgjWQyEXSWo23Ru9iVweY9xwYxLLD+GympFAC6FW/tUWoLBGknXrf5ZlHVJWXrIHU7c+LLPCKfwVXwIKC/7pk1iwkWVgbJUwzzJi1AGXTyFdwFDiG735Bk4wvSogxqWuu+2xs/HwkAZJNs88TkEeuXfM7qos24ANGBxRKO+ZPPYCpSSxVoLULKr2LTCuD+Bqf+cQCPxMq+Hrrv3xOV+kH7zEYHzFiPYbclRKbkoT0M5FXVMZl8ZKnfBPUBg=
provider: pypi
user: inveniosoftware