Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #3793

Closed
wants to merge 7 commits into from
Closed

WIP #3793

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 75 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
CORE_REPO_SHA: ${{ github.sha }}

jobs:
build:
build-tox:
env:
# We use these variables to convert between tox and GHA version literals
py38: 3.8
Expand Down Expand Up @@ -210,3 +210,77 @@ jobs:
}}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra

build-nox:
env:
# We use these variables to convert between tox and GHA version literals
py38: 3.8
py39: 3.9
py310: "3.10"
py311: "3.11"
pypy3: pypy-3.8
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{matrix.os }}

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: [py38, py39, py310, py311, pypy3]
requirements-number: ["0"]
package-path:
- "exporter/exporter-otlp-proto-grpc"
os: [ubuntu-20.04, windows-2019]
exclude:
- python-version: pypy3
package-path:
- "exporter/exporter-otlp-proto-grpc"
include:
- package-path: "exporter/exporter-otlp-proto-grpc"
requirements-number: ["0", "1"]

steps:
- name: Checkout Core Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v2

- name: Set up Python ${{ env[matrix.python-version] }}
uses: actions/setup-python@v2
with:
python-version: ${{ env[matrix.python-version] }}
architecture: 'x64'

- name: Install nox
run: pip install nox

- name: Windows does not let git check out files with long names
if: ${{ matrix.os == 'windows-2019'}}
run: git config --system core.longpaths true

- name: run nox
run: nox -f ${{ matrix.package-path }}/noxfile.py -e test_${{ matrix.requirements_number }}-${{ matrix.python-version }} -- -ra --benchmark-json=${{env.RUN_MATRIX_COMBINATION }}-benchmark.json

lint:
strategy:
fail-fast: false
matrix:
package-path:
- "exporter/exporter-otlp-proto-grpc"

name: "lint"
runs-on: ubuntu-20.04

steps:
- name: Checkout Core Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
architecture: 'x64'

- name: Install nox
run: pip install nox

- name: run nox
run: nox -f ${{ matrix.package-path }}/noxfile.py -e lint
31 changes: 31 additions & 0 deletions exporter/opentelemetry-exporter-otlp-proto-grpc/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[flake8]
ignore =
# line too long, defer to black
E501

# allow line breaks before binary ops
W503

# allow line breaks after binary ops
W504

# allow whitespace before ':' (https://github.com/psf/black#slices)
E203

exclude =
.bzr
.git
.hg
.svn
.tox
CVS
.venv*/
venv*/
target
__pycache__
exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/gen/
docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/gen/
docs/examples/opentelemetry-example-app/build/*
opentelemetry-proto/build/*
opentelemetry-proto/src/opentelemetry/proto/
*/build/lib/*
19 changes: 19 additions & 0 deletions exporter/opentelemetry-exporter-otlp-proto-grpc/.isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[settings]
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=79
profile=black

; 3 stands for Vertical Hanging Indent, e.g.
; from third_party import (
; lib1,
; lib2,
; lib3,
; )
; docs: https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output=3
skip=target
skip_glob=**/gen/*,.venv*/*,venv*/*,**/proto/*,.tox/*
known_first_party=opentelemetry,opentelemetry_example_app
known_third_party=psutil,pytest,redis,redis_opentracing
Loading
Loading