mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-29 05:04:05 +08:00
Modify existing workflow for CI tests
This commit is contained in:
@ -4,3 +4,4 @@ omit =
|
|||||||
*/setup.py
|
*/setup.py
|
||||||
*/gen/*
|
*/gen/*
|
||||||
reference/*
|
reference/*
|
||||||
|
opentelemetry-python-core/*
|
||||||
|
1
.flake8
1
.flake8
@ -21,5 +21,6 @@ exclude =
|
|||||||
exporter/opentelemetry-exporter-jaeger/build/*
|
exporter/opentelemetry-exporter-jaeger/build/*
|
||||||
docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/gen/
|
docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/gen/
|
||||||
docs/examples/opentelemetry-example-app/build/*
|
docs/examples/opentelemetry-example-app/build/*
|
||||||
|
opentelemetry-python-core/
|
||||||
opentelemetry-proto/build/*
|
opentelemetry-proto/build/*
|
||||||
opentelemetry-proto/src/opentelemetry/proto/
|
opentelemetry-proto/src/opentelemetry/proto/
|
||||||
|
35
.github/workflows/test.yml
vendored
35
.github/workflows/test.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Test
|
name: Contrib Repo Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -20,18 +20,9 @@ jobs:
|
|||||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [ py35, py36, py37, py38, pypy3 ]
|
python-version: [ py35, py36, py37, py38, pypy3 ]
|
||||||
package: ["instrumentation", "core", "exporter"]
|
package: ["instrumentation", "exporter"]
|
||||||
os: [ ubuntu-latest ]
|
os: [ ubuntu-latest ]
|
||||||
include:
|
include:
|
||||||
- python-version: py38
|
|
||||||
package: "tracecontext"
|
|
||||||
os: ubuntu-latest
|
|
||||||
- python-version: py38
|
|
||||||
package: "mypy"
|
|
||||||
os: ubuntu-latest
|
|
||||||
- python-version: py38
|
|
||||||
package: "mypyinstalled"
|
|
||||||
os: ubuntu-latest
|
|
||||||
# py35-instrumentation segfaults on 18.04 so we instead run on 20.04
|
# py35-instrumentation segfaults on 18.04 so we instead run on 20.04
|
||||||
- python-version: py35
|
- python-version: py35
|
||||||
package: instrumentation
|
package: instrumentation
|
||||||
@ -41,7 +32,14 @@ jobs:
|
|||||||
python-version: py35
|
python-version: py35
|
||||||
package: instrumentation
|
package: instrumentation
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout Contrib Repo at SHA - ${{ github.sha }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Checkout Core Repo @ tag v0.15b0
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: open-telemetry/opentelemetry-python
|
||||||
|
ref: v0.15b0
|
||||||
|
path: opentelemetry-python-core
|
||||||
- name: Set up Python ${{ env[matrix.python-version] }}
|
- name: Set up Python ${{ env[matrix.python-version] }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
@ -60,11 +58,18 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
tox-environment: [ "docker-tests", "lint", "docs" ]
|
tox-environment: [ "docker-tests", "lint" ]
|
||||||
name: ${{ matrix.tox-environment }}
|
name: ${{ matrix.tox-environment }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout Contrib Repo at SHA - ${{ github.sha }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Checkout Core Repo @ tag v0.15b0
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: open-telemetry/opentelemetry-python
|
||||||
|
ref: v0.15b0
|
||||||
|
path: opentelemetry-python-core
|
||||||
- name: Set up Python 3.8
|
- name: Set up Python 3.8
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
@ -78,4 +83,4 @@ jobs:
|
|||||||
path: .tox
|
path: .tox
|
||||||
key: tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}
|
key: tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}
|
||||||
- name: run tox
|
- name: run tox
|
||||||
run: tox -e ${{ matrix.tox-environment }}
|
run: tox -e ${{ matrix.tox-environment }}
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,6 +21,7 @@ lib64
|
|||||||
__pycache__
|
__pycache__
|
||||||
venv*/
|
venv*/
|
||||||
.venv*/
|
.venv*/
|
||||||
|
opentelemetry-python-core*/
|
||||||
|
|
||||||
# Installer logs
|
# Installer logs
|
||||||
pip-log.txt
|
pip-log.txt
|
||||||
|
@ -13,6 +13,6 @@ line_length=79
|
|||||||
; docs: https://github.com/timothycrosley/isort#multi-line-output-modes
|
; docs: https://github.com/timothycrosley/isort#multi-line-output-modes
|
||||||
multi_line_output=3
|
multi_line_output=3
|
||||||
skip=target
|
skip=target
|
||||||
skip_glob=**/gen/*,.venv*/*,venv*/*,reference*/*
|
skip_glob=**/gen/*,.venv*/*,venv*/*,reference*/*,opentelemetry-python-core*/*
|
||||||
known_first_party=opentelemetry
|
known_first_party=opentelemetry
|
||||||
known_third_party=psutil,pytest,redis,redis_opentracing
|
known_third_party=psutil,pytest,redis,redis_opentracing
|
||||||
|
@ -7,7 +7,7 @@ extension-pkg-whitelist=
|
|||||||
|
|
||||||
# Add list of files or directories to be excluded. They should be base names, not
|
# Add list of files or directories to be excluded. They should be base names, not
|
||||||
# paths.
|
# paths.
|
||||||
ignore=CVS,gen
|
ignore=CVS,gen,opentelemetry-python-core
|
||||||
|
|
||||||
# Add files or directories matching the regex patterns to be excluded. The
|
# Add files or directories matching the regex patterns to be excluded. The
|
||||||
# regex matches against base names, not paths.
|
# regex matches against base names, not paths.
|
||||||
|
@ -4,13 +4,9 @@
|
|||||||
ignore=
|
ignore=
|
||||||
_template
|
_template
|
||||||
reference
|
reference
|
||||||
|
opentelemetry-python-core
|
||||||
|
|
||||||
sortfirst=
|
sortfirst=
|
||||||
opentelemetry-api
|
|
||||||
opentelemetry-sdk
|
|
||||||
opentelemetry-instrumentation
|
|
||||||
opentelemetry-proto
|
|
||||||
tests/util
|
|
||||||
instrumentation/opentelemetry-instrumentation-wsgi
|
instrumentation/opentelemetry-instrumentation-wsgi
|
||||||
instrumentation/opentelemetry-instrumentation-dbapi
|
instrumentation/opentelemetry-instrumentation-dbapi
|
||||||
instrumentation/opentelemetry-instrumentation-asgi
|
instrumentation/opentelemetry-instrumentation-asgi
|
||||||
|
@ -3,7 +3,8 @@ line-length = 79
|
|||||||
exclude = '''
|
exclude = '''
|
||||||
(
|
(
|
||||||
/(
|
/(
|
||||||
reference # original files from DataDog
|
reference|
|
||||||
|
opentelemetry-python-core
|
||||||
)/
|
)/
|
||||||
)
|
)
|
||||||
'''
|
'''
|
||||||
|
163
tox.ini
163
tox.ini
@ -4,29 +4,6 @@ skip_missing_interpreters = True
|
|||||||
envlist =
|
envlist =
|
||||||
; Environments are organized by individual package, allowing
|
; Environments are organized by individual package, allowing
|
||||||
; for specifying supported Python versions per package.
|
; for specifying supported Python versions per package.
|
||||||
; opentelemetry-api
|
|
||||||
py3{5,6,7,8}-test-core-api
|
|
||||||
pypy3-test-core-api
|
|
||||||
|
|
||||||
; opentelemetry-proto
|
|
||||||
py3{5,6,7,8}-test-core-proto
|
|
||||||
pypy3-test-core-proto
|
|
||||||
|
|
||||||
; opentelemetry-sdk
|
|
||||||
py3{5,6,7,8}-test-core-sdk
|
|
||||||
pypy3-test-core-sdk
|
|
||||||
|
|
||||||
; opentelemetry-instrumentation
|
|
||||||
py3{5,6,7,8}-test-core-instrumentation
|
|
||||||
pypy3-test-core-instrumentation
|
|
||||||
|
|
||||||
; docs/getting-started
|
|
||||||
py3{5,6,7,8}-test-core-getting-started
|
|
||||||
pypy3-test-core-getting-started
|
|
||||||
|
|
||||||
; opentelemetry-example-app
|
|
||||||
py3{5,6,7,8}-test-instrumentation-example-app
|
|
||||||
pypy3-test-instrumentation-example-app
|
|
||||||
|
|
||||||
; opentelemetry-instrumentation-aiohttp-client
|
; opentelemetry-instrumentation-aiohttp-client
|
||||||
py3{5,6,7,8}-test-instrumentation-aiohttp-client
|
py3{5,6,7,8}-test-instrumentation-aiohttp-client
|
||||||
@ -82,10 +59,6 @@ envlist =
|
|||||||
py3{5,6,7,8}-test-instrumentation-jinja2
|
py3{5,6,7,8}-test-instrumentation-jinja2
|
||||||
pypy3-test-instrumentation-jinja2
|
pypy3-test-instrumentation-jinja2
|
||||||
|
|
||||||
; opentelemetry-exporter-jaeger
|
|
||||||
py3{5,6,7,8}-test-exporter-jaeger
|
|
||||||
pypy3-test-exporter-jaeger
|
|
||||||
|
|
||||||
; opentelemetry-exporter-datadog
|
; opentelemetry-exporter-datadog
|
||||||
py3{5,6,7,8}-test-exporter-datadog
|
py3{5,6,7,8}-test-exporter-datadog
|
||||||
|
|
||||||
@ -93,18 +66,6 @@ envlist =
|
|||||||
py3{5,6,7,8}-test-instrumentation-mysql
|
py3{5,6,7,8}-test-instrumentation-mysql
|
||||||
pypy3-test-instrumentation-mysql
|
pypy3-test-instrumentation-mysql
|
||||||
|
|
||||||
; opentelemetry-exporter-opencensus
|
|
||||||
py3{5,6,7,8}-test-exporter-opencensus
|
|
||||||
; exporter-opencensus intentionally excluded from pypy3
|
|
||||||
|
|
||||||
; opentelemetry-exporter-otlp
|
|
||||||
py3{5,6,7,8}-test-exporter-otlp
|
|
||||||
; exporter-otlp intentionally excluded from pypy3
|
|
||||||
|
|
||||||
; opentelemetry-exporter-prometheus
|
|
||||||
py3{5,6,7,8}-test-exporter-prometheus
|
|
||||||
pypy3-test-exporter-prometheus
|
|
||||||
|
|
||||||
; opentelemetry-instrumentation-psycopg2
|
; opentelemetry-instrumentation-psycopg2
|
||||||
py3{5,6,7,8}-test-instrumentation-psycopg2
|
py3{5,6,7,8}-test-instrumentation-psycopg2
|
||||||
; ext-psycopg2 intentionally excluded from pypy3
|
; ext-psycopg2 intentionally excluded from pypy3
|
||||||
@ -141,14 +102,6 @@ envlist =
|
|||||||
py3{5,6,7,8}-test-instrumentation-wsgi
|
py3{5,6,7,8}-test-instrumentation-wsgi
|
||||||
pypy3-test-instrumentation-wsgi
|
pypy3-test-instrumentation-wsgi
|
||||||
|
|
||||||
; opentelemetry-exporter-zipkin
|
|
||||||
py3{5,6,7,8}-test-exporter-zipkin
|
|
||||||
pypy3-test-exporter-zipkin
|
|
||||||
|
|
||||||
; opentelemetry-opentracing-shim
|
|
||||||
py3{5,6,7,8}-test-core-opentracing-shim
|
|
||||||
pypy3-test-core-opentracing-shim
|
|
||||||
|
|
||||||
; opentelemetry-instrumentation-grpc
|
; opentelemetry-instrumentation-grpc
|
||||||
py3{5,6,7,8}-test-instrumentation-grpc
|
py3{5,6,7,8}-test-instrumentation-grpc
|
||||||
|
|
||||||
@ -175,9 +128,6 @@ envlist =
|
|||||||
pypy3-test-instrumentation-tornado
|
pypy3-test-instrumentation-tornado
|
||||||
|
|
||||||
lint
|
lint
|
||||||
py38-tracecontext
|
|
||||||
py38-{mypy,mypyinstalled}
|
|
||||||
docs
|
|
||||||
docker-tests
|
docker-tests
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -186,7 +136,6 @@ deps =
|
|||||||
test: pytest
|
test: pytest
|
||||||
coverage: pytest
|
coverage: pytest
|
||||||
coverage: pytest-cov
|
coverage: pytest-cov
|
||||||
mypy,mypyinstalled: mypy
|
|
||||||
elasticsearch2: elasticsearch-dsl>=2.0,<3.0
|
elasticsearch2: elasticsearch-dsl>=2.0,<3.0
|
||||||
elasticsearch2: elasticsearch>=2.0,<3.0
|
elasticsearch2: elasticsearch>=2.0,<3.0
|
||||||
elasticsearch5: elasticsearch-dsl>=5.0,<6.0
|
elasticsearch5: elasticsearch-dsl>=5.0,<6.0
|
||||||
@ -199,16 +148,7 @@ deps =
|
|||||||
; FIXME: add coverage testing
|
; FIXME: add coverage testing
|
||||||
; FIXME: add mypy testing
|
; FIXME: add mypy testing
|
||||||
|
|
||||||
setenv = mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/
|
|
||||||
|
|
||||||
changedir =
|
changedir =
|
||||||
test-core-api: opentelemetry-api/tests
|
|
||||||
test-core-sdk: opentelemetry-sdk/tests
|
|
||||||
test-core-proto: opentelemetry-proto/tests
|
|
||||||
test-core-instrumentation: opentelemetry-instrumentation/tests
|
|
||||||
test-core-getting-started: docs/getting_started/tests
|
|
||||||
test-core-opentracing-shim: instrumentation/opentelemetry-instrumentation-opentracing-shim/tests
|
|
||||||
|
|
||||||
test-instrumentation-aiohttp-client: instrumentation/opentelemetry-instrumentation-aiohttp-client/tests
|
test-instrumentation-aiohttp-client: instrumentation/opentelemetry-instrumentation-aiohttp-client/tests
|
||||||
test-instrumentation-aiopg: instrumentation/opentelemetry-instrumentation-aiopg/tests
|
test-instrumentation-aiopg: instrumentation/opentelemetry-instrumentation-aiopg/tests
|
||||||
test-instrumentation-asgi: instrumentation/opentelemetry-instrumentation-asgi/tests
|
test-instrumentation-asgi: instrumentation/opentelemetry-instrumentation-asgi/tests
|
||||||
@ -218,7 +158,6 @@ changedir =
|
|||||||
test-instrumentation-celery: instrumentation/opentelemetry-instrumentation-celery/tests
|
test-instrumentation-celery: instrumentation/opentelemetry-instrumentation-celery/tests
|
||||||
test-instrumentation-dbapi: instrumentation/opentelemetry-instrumentation-dbapi/tests
|
test-instrumentation-dbapi: instrumentation/opentelemetry-instrumentation-dbapi/tests
|
||||||
test-instrumentation-django: instrumentation/opentelemetry-instrumentation-django/tests
|
test-instrumentation-django: instrumentation/opentelemetry-instrumentation-django/tests
|
||||||
test-instrumentation-example-app: docs/examples/opentelemetry-example-app/tests
|
|
||||||
test-instrumentation-elasticsearch{2,5,6,7}: instrumentation/opentelemetry-instrumentation-elasticsearch/tests
|
test-instrumentation-elasticsearch{2,5,6,7}: instrumentation/opentelemetry-instrumentation-elasticsearch/tests
|
||||||
test-instrumentation-falcon: instrumentation/opentelemetry-instrumentation-falcon/tests
|
test-instrumentation-falcon: instrumentation/opentelemetry-instrumentation-falcon/tests
|
||||||
test-instrumentation-fastapi: instrumentation/opentelemetry-instrumentation-fastapi/tests
|
test-instrumentation-fastapi: instrumentation/opentelemetry-instrumentation-fastapi/tests
|
||||||
@ -240,27 +179,17 @@ changedir =
|
|||||||
test-instrumentation-tornado: instrumentation/opentelemetry-instrumentation-tornado/tests
|
test-instrumentation-tornado: instrumentation/opentelemetry-instrumentation-tornado/tests
|
||||||
test-instrumentation-wsgi: instrumentation/opentelemetry-instrumentation-wsgi/tests
|
test-instrumentation-wsgi: instrumentation/opentelemetry-instrumentation-wsgi/tests
|
||||||
|
|
||||||
test-exporter-jaeger: exporter/opentelemetry-exporter-jaeger/tests
|
|
||||||
test-exporter-datadog: exporter/opentelemetry-exporter-datadog/tests
|
test-exporter-datadog: exporter/opentelemetry-exporter-datadog/tests
|
||||||
test-exporter-opencensus: exporter/opentelemetry-exporter-opencensus/tests
|
|
||||||
test-exporter-otlp: exporter/opentelemetry-exporter-otlp/tests
|
|
||||||
test-exporter-prometheus: exporter/opentelemetry-exporter-prometheus/tests
|
|
||||||
test-exporter-zipkin: exporter/opentelemetry-exporter-zipkin/tests
|
|
||||||
|
|
||||||
commands_pre =
|
commands_pre =
|
||||||
; Install without -e to test the actual installation
|
; Install without -e to test the actual installation
|
||||||
py3{5,6,7,8}: python -m pip install -U pip setuptools wheel
|
py3{5,6,7,8}: python -m pip install -U pip setuptools wheel
|
||||||
; Install common packages for all the tests. These are not needed in all the
|
; Install common packages for all the tests. These are not needed in all the
|
||||||
; cases but it saves a lot of boilerplate in this file.
|
; cases but it saves a lot of boilerplate in this file.
|
||||||
test: pip install {toxinidir}/opentelemetry-api {toxinidir}/opentelemetry-sdk {toxinidir}/tests/util
|
test: pip install {toxinidir}/opentelemetry-python-core/opentelemetry-api {toxinidir}/opentelemetry-python-core/opentelemetry-sdk {toxinidir}/opentelemetry-python-core/tests/util
|
||||||
|
|
||||||
test-core-proto: pip install {toxinidir}/opentelemetry-proto
|
|
||||||
instrumentation: pip install {toxinidir}/opentelemetry-instrumentation
|
|
||||||
|
|
||||||
example-app: pip install {toxinidir}/opentelemetry-instrumentation {toxinidir}/instrumentation/opentelemetry-instrumentation-requests {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi {toxinidir}/instrumentation/opentelemetry-instrumentation-flask {toxinidir}/docs/examples/opentelemetry-example-app
|
|
||||||
|
|
||||||
getting-started: pip install -e {toxinidir}/opentelemetry-instrumentation -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask
|
|
||||||
|
|
||||||
|
test: pip install {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation
|
||||||
|
|
||||||
celery: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test]
|
celery: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test]
|
||||||
|
|
||||||
grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
|
grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
|
||||||
@ -287,13 +216,6 @@ commands_pre =
|
|||||||
|
|
||||||
mysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test]
|
mysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test]
|
||||||
|
|
||||||
opencensus: pip install {toxinidir}/exporter/opentelemetry-exporter-opencensus
|
|
||||||
|
|
||||||
otlp: pip install {toxinidir}/opentelemetry-proto
|
|
||||||
otlp: pip install {toxinidir}/exporter/opentelemetry-exporter-otlp
|
|
||||||
|
|
||||||
prometheus: pip install {toxinidir}/exporter/opentelemetry-exporter-prometheus
|
|
||||||
|
|
||||||
pymemcache: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test]
|
pymemcache: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test]
|
||||||
|
|
||||||
pymongo: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test]
|
pymongo: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test]
|
||||||
@ -316,49 +238,40 @@ commands_pre =
|
|||||||
|
|
||||||
jinja2: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2[test]
|
jinja2: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2[test]
|
||||||
|
|
||||||
aiohttp-client: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client
|
aiohttp-client: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client
|
||||||
|
|
||||||
aiopg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test]
|
aiopg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test]
|
||||||
|
|
||||||
jaeger: pip install {toxinidir}/exporter/opentelemetry-exporter-jaeger
|
datadog: pip install {toxinidir}/exporter/opentelemetry-exporter-datadog
|
||||||
|
|
||||||
opentracing-shim: pip install {toxinidir}/opentelemetry-sdk
|
|
||||||
opentracing-shim: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-opentracing-shim
|
|
||||||
|
|
||||||
datadog: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/exporter/opentelemetry-exporter-datadog
|
|
||||||
|
|
||||||
zipkin: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin
|
|
||||||
|
|
||||||
sqlalchemy: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy
|
sqlalchemy: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy
|
||||||
|
|
||||||
system-metrics: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test]
|
system-metrics: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test]
|
||||||
|
|
||||||
elasticsearch{2,5,6,7}: pip install {toxinidir}/opentelemetry-instrumentation {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test]
|
elasticsearch{2,5,6,7}: pip install {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test]
|
||||||
|
|
||||||
; In order to get a healthy coverage report,
|
; In order to get a healthy coverage report,
|
||||||
; we have to install packages in editable mode.
|
; we have to install packages in editable mode.
|
||||||
coverage: python {toxinidir}/scripts/eachdist.py install --editable
|
coverage: python {toxinidir}/scripts/eachdist.py install --editable
|
||||||
|
|
||||||
; Using file:// here because otherwise tox invokes just "pip install
|
|
||||||
; opentelemetry-api", leading to an error
|
|
||||||
mypyinstalled: pip install file://{toxinidir}/opentelemetry-api/
|
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
test: pytest {posargs}
|
test: pytest {posargs}
|
||||||
coverage: {toxinidir}/scripts/coverage.sh
|
coverage: {toxinidir}/scripts/coverage.sh
|
||||||
|
|
||||||
mypy: mypy --namespace-packages opentelemetry-api/src/opentelemetry/
|
|
||||||
; For test code, we don't want to enforce the full mypy strictness
|
|
||||||
mypy: mypy --namespace-packages --config-file=mypy-relaxed.ini opentelemetry-api/tests/
|
|
||||||
|
|
||||||
; Test that mypy can pick up typeinfo from an installed package (otherwise,
|
|
||||||
; implicit Any due to unfollowed import would result).
|
|
||||||
mypyinstalled: mypy --namespace-packages opentelemetry-api/tests/mypysmoke.py --strict
|
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
basepython: python3.8
|
basepython: python3.8
|
||||||
recreate = True
|
recreate = True
|
||||||
deps =
|
deps =
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/opentelemetry-proto
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/opentelemetry-api
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/opentelemetry-sdk
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/opentelemetry-proto
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/tests/util
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-jaeger
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-zipkin
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-prometheus
|
||||||
|
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-otlp
|
||||||
-c dev-requirements.txt
|
-c dev-requirements.txt
|
||||||
pylint
|
pylint
|
||||||
flake8
|
flake8
|
||||||
@ -374,40 +287,6 @@ commands_pre =
|
|||||||
commands =
|
commands =
|
||||||
python scripts/eachdist.py lint --check-only
|
python scripts/eachdist.py lint --check-only
|
||||||
|
|
||||||
[testenv:docs]
|
|
||||||
deps =
|
|
||||||
-c {toxinidir}/dev-requirements.txt
|
|
||||||
-r {toxinidir}/docs-requirements.txt
|
|
||||||
|
|
||||||
commands_pre =
|
|
||||||
pip install -e {toxinidir}/opentelemetry-api \
|
|
||||||
-e {toxinidir}/opentelemetry-sdk
|
|
||||||
|
|
||||||
changedir = docs
|
|
||||||
|
|
||||||
commands =
|
|
||||||
sphinx-build -E -a -W -b html -T . _build/html
|
|
||||||
|
|
||||||
[testenv:py38-tracecontext]
|
|
||||||
basepython: python3.8
|
|
||||||
deps =
|
|
||||||
# needed for tracecontext
|
|
||||||
aiohttp~=3.6
|
|
||||||
# needed for example trace integration
|
|
||||||
flask~=1.1
|
|
||||||
requests~=2.7
|
|
||||||
|
|
||||||
commands_pre =
|
|
||||||
pip install -e {toxinidir}/opentelemetry-api \
|
|
||||||
-e {toxinidir}/opentelemetry-sdk \
|
|
||||||
-e {toxinidir}/opentelemetry-instrumentation \
|
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests \
|
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi \
|
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask
|
|
||||||
|
|
||||||
commands =
|
|
||||||
{toxinidir}/scripts/tracecontext-integration-test.sh
|
|
||||||
|
|
||||||
[testenv:docker-tests]
|
[testenv:docker-tests]
|
||||||
deps =
|
deps =
|
||||||
pytest
|
pytest
|
||||||
@ -426,10 +305,10 @@ changedir =
|
|||||||
tests/opentelemetry-docker-tests/tests
|
tests/opentelemetry-docker-tests/tests
|
||||||
|
|
||||||
commands_pre =
|
commands_pre =
|
||||||
pip install -e {toxinidir}/opentelemetry-api \
|
pip install -e {toxinidir}/opentelemetry-python-core/opentelemetry-api \
|
||||||
-e {toxinidir}/opentelemetry-sdk \
|
-e {toxinidir}/opentelemetry-python-core/opentelemetry-sdk \
|
||||||
-e {toxinidir}/opentelemetry-instrumentation \
|
-e {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation \
|
||||||
-e {toxinidir}/tests/util \
|
-e {toxinidir}/opentelemetry-python-core/tests/util \
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg \
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg \
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery \
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery \
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi \
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi \
|
||||||
@ -441,7 +320,7 @@ commands_pre =
|
|||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg \
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg \
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-redis \
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-redis \
|
||||||
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics \
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics \
|
||||||
-e {toxinidir}/exporter/opentelemetry-exporter-opencensus
|
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-opencensus
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
python check_availability.py
|
python check_availability.py
|
||||||
commands =
|
commands =
|
||||||
|
Reference in New Issue
Block a user