Skip to content

Commit ae533f7

Browse files
author
alrex
authored
infra: accelerate builds (#693)
Some build time improvements: - split lint/docker-tests/docs into their own steps. Since lint is usually the thing that fails anyways, it's good to have it run first. We could make the build depend on this step to prevent slowing other builds waiting in the pipeline (since we only have 5 workers) - move all pip install commands into a single line per test environment. this reduces the overhead of calling the pip command separately multiple times per environment. - removed pip upgrade command for pypy3 and py38
1 parent 2249748 commit ae533f7

2 files changed

Lines changed: 28 additions & 48 deletions

File tree

.travis.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ language: python
44

55
cache: pip
66

7-
python:
8-
- 'pypy3'
9-
- '3.8'
10-
- '3.4'
11-
- '3.5'
12-
- '3.6'
13-
- '3.7'
7+
matrix:
8+
include:
9+
- python: 3.8
10+
env: TOXENV=lint
11+
- python: pypy3
12+
- python: 3.8
13+
- python: 3.4
14+
- python: 3.5
15+
- python: 3.6
16+
- python: 3.7
17+
- python: 3.8
18+
env: TOXENV=docker-tests
19+
- python: 3.8
20+
env: TOXENV=docs
1421

1522
#matrix:
1623
# allow_failures:

tox.ini

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ envlist =
115115
docs
116116
docker-tests
117117

118-
[travis]
119-
python =
120-
3.8: py38, lint, docs, docker-tests
121-
122118
[testenv]
123119
deps =
124120
-c dev-requirements.txt
@@ -159,26 +155,16 @@ changedir =
159155

160156
commands_pre =
161157
; Install without -e to test the actual installation
162-
python -m pip install -U pip setuptools wheel
163-
158+
py3{4,5,6,7}: python -m pip install -U pip setuptools wheel
164159
; Install common packages for all the tests. These are not needed in all the
165160
; cases but it saves a lot of boilerplate in this file.
166-
test: pip install {toxinidir}/opentelemetry-api
167-
test: pip install {toxinidir}/opentelemetry-sdk
168-
test: pip install {toxinidir}/tests/util
161+
test: pip install {toxinidir}/opentelemetry-api {toxinidir}/opentelemetry-sdk {toxinidir}/tests/util
169162

170163
test-auto-instrumentation: pip install {toxinidir}/opentelemetry-auto-instrumentation
171164

172-
example-app: pip install {toxinidir}/opentelemetry-auto-instrumentation
173-
example-app: pip install {toxinidir}/ext/opentelemetry-ext-requests
174-
example-app: pip install {toxinidir}/ext/opentelemetry-ext-wsgi
175-
example-app: pip install {toxinidir}/ext/opentelemetry-ext-flask
176-
example-app: pip install {toxinidir}/docs/examples/opentelemetry-example-app
165+
example-app: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-requests {toxinidir}/ext/opentelemetry-ext-wsgi {toxinidir}/ext/opentelemetry-ext-flask {toxinidir}/docs/examples/opentelemetry-example-app
177166

178-
getting-started: pip install -e {toxinidir}/opentelemetry-auto-instrumentation
179-
getting-started: pip install -e {toxinidir}/ext/opentelemetry-ext-requests
180-
getting-started: pip install -e {toxinidir}/ext/opentelemetry-ext-wsgi
181-
getting-started: pip install -e {toxinidir}/ext/opentelemetry-ext-flask
167+
getting-started: pip install -e {toxinidir}/opentelemetry-auto-instrumentation -e {toxinidir}/ext/opentelemetry-ext-requests -e {toxinidir}/ext/opentelemetry-ext-wsgi -e {toxinidir}/ext/opentelemetry-ext-flask
182168

183169
grpc: pip install {toxinidir}/ext/opentelemetry-ext-grpc[test]
184170

@@ -191,48 +177,35 @@ commands_pre =
191177

192178
django: pip install {toxinidir}/ext/opentelemetry-ext-django[test]
193179

194-
mysql: pip install {toxinidir}/opentelemetry-auto-instrumentation
195-
mysql: pip install {toxinidir}/ext/opentelemetry-ext-dbapi
196-
mysql: pip install {toxinidir}/ext/opentelemetry-ext-mysql[test]
180+
mysql: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-dbapi {toxinidir}/ext/opentelemetry-ext-mysql[test]
197181

198182
otcollector: pip install {toxinidir}/ext/opentelemetry-ext-otcollector
199183

200184
prometheus: pip install {toxinidir}/ext/opentelemetry-ext-prometheus
201185

202-
pymongo: pip install {toxinidir}/opentelemetry-auto-instrumentation
203-
pymongo: pip install {toxinidir}/ext/opentelemetry-ext-pymongo[test]
186+
pymongo: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-pymongo[test]
204187

205-
psycopg2: pip install {toxinidir}/opentelemetry-auto-instrumentation
206-
psycopg2: pip install {toxinidir}/ext/opentelemetry-ext-dbapi
207-
psycopg2: pip install {toxinidir}/ext/opentelemetry-ext-psycopg2[test]
188+
psycopg2: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-dbapi {toxinidir}/ext/opentelemetry-ext-psycopg2 {toxinidir}/ext/opentelemetry-ext-psycopg2[test]
208189

209-
pymysql: pip install {toxinidir}/opentelemetry-auto-instrumentation
210-
pymysql: pip install {toxinidir}/ext/opentelemetry-ext-dbapi
211-
pymysql: pip install {toxinidir}/ext/opentelemetry-ext-pymysql[test]
190+
pymysql: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-dbapi {toxinidir}/ext/opentelemetry-ext-pymysql[test]
212191

213-
redis: pip install {toxinidir}/opentelemetry-auto-instrumentation
214-
redis: pip install {toxinidir}/ext/opentelemetry-ext-redis[test]
192+
redis: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-redis[test]
215193

216-
requests: pip install {toxinidir}/opentelemetry-auto-instrumentation
217-
requests: pip install {toxinidir}/ext/opentelemetry-ext-requests[test]
194+
requests: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-requests[test]
218195

219-
jinja2: pip install {toxinidir}/opentelemetry-auto-instrumentation
220-
jinja2: pip install {toxinidir}/ext/opentelemetry-ext-jinja2[test]
196+
jinja2: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-jinja2[test]
221197

222-
aiohttp-client: pip install {toxinidir}/opentelemetry-sdk
223-
aiohttp-client: pip install {toxinidir}/ext/opentelemetry-ext-aiohttp-client
198+
aiohttp-client: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/ext/opentelemetry-ext-aiohttp-client
224199

225200
jaeger: pip install {toxinidir}/ext/opentelemetry-ext-jaeger
226201

227-
datadog: pip install {toxinidir}/opentelemetry-sdk
228-
datadog: pip install {toxinidir}/ext/opentelemetry-ext-datadog
202+
datadog: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/ext/opentelemetry-ext-datadog
229203

230204
opentracing-shim: pip install {toxinidir}/ext/opentelemetry-ext-opentracing-shim
231205

232206
zipkin: pip install {toxinidir}/ext/opentelemetry-ext-zipkin
233207

234-
sqlalchemy: pip install {toxinidir}/opentelemetry-auto-instrumentation
235-
sqlalchemy: pip install {toxinidir}/ext/opentelemetry-ext-sqlalchemy
208+
sqlalchemy: pip install {toxinidir}/opentelemetry-auto-instrumentation {toxinidir}/ext/opentelemetry-ext-sqlalchemy
236209

237210
; In order to get a healthy coverage report,
238211
; we have to install packages in editable mode.

0 commit comments

Comments
 (0)