Skip to content

Commit 96f0c15

Browse files
committed
Separate in 2 workflows
1 parent 460dc0a commit 96f0c15

File tree

3 files changed

+147
-135
lines changed

3 files changed

+147
-135
lines changed
+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Contrib Repo Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'release/*'
7+
pull_request:
8+
env:
9+
CORE_REPO_SHA: 84c0e4f38d4fcdb8c13fd3988469fbb8cda28150
10+
11+
jobs:
12+
instrumentations-0:
13+
env:
14+
# We use these variables to convert between tox and GHA version literals
15+
py37: 3.7
16+
py38: 3.8
17+
py39: 3.9
18+
py310: "3.10"
19+
py311: "3.11"
20+
pypy3: pypy-3.7
21+
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
25+
matrix:
26+
python-version: [py37, py38, py39, py310, py311, pypy3]
27+
package:
28+
# Do not add more instrumentations here, add them in instrumentations_1.yml.
29+
- "aiohttp-client"
30+
- "aiohttp-server"
31+
- "aiopg"
32+
- "aio-pika"
33+
- "asgi"
34+
- "asyncpg"
35+
- "aws-lambda"
36+
- "boto"
37+
- "boto3sqs"
38+
- "botocore"
39+
- "cassandra"
40+
- "celery"
41+
- "confluent-kafka"
42+
- "dbapi"
43+
- "django"
44+
- "elasticsearch"
45+
- "falcon"
46+
- "fastapi"
47+
- "flask"
48+
- "grpc"
49+
- "httpx"
50+
- "jinja2"
51+
- "kafka-python"
52+
- "logging"
53+
- "mysql"
54+
- "mysqlclient"
55+
- "pika"
56+
- "psycopg2"
57+
- "pymemcache"
58+
- "pymongo"
59+
- "pymysql"
60+
- "pyramid"
61+
- "redis"
62+
- "remoulade"
63+
- "requests"
64+
- "sklearn"
65+
- "sqlalchemy"
66+
- "sqlite3"
67+
- "starlette"
68+
- "system-metrics"
69+
- "tornado"
70+
- "tortoiseorm"
71+
os: [ubuntu-20.04]
72+
steps:
73+
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
74+
uses: actions/checkout@v2
75+
- name: Set up Python ${{ env[matrix.python-version] }}
76+
uses: actions/setup-python@v4
77+
with:
78+
python-version: ${{ env[matrix.python-version] }}
79+
- name: Install tox
80+
run: pip install tox==3.27.1 tox-factor
81+
- name: Cache tox environment
82+
# Preserves .tox directory between runs for faster installs
83+
uses: actions/cache@v1
84+
with:
85+
path: |
86+
.tox
87+
~/.cache/pip
88+
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
89+
- name: run tox
90+
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Contrib Repo Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'release/*'
7+
pull_request:
8+
env:
9+
CORE_REPO_SHA: 84c0e4f38d4fcdb8c13fd3988469fbb8cda28150
10+
11+
jobs:
12+
instrumentations-1:
13+
env:
14+
# We use these variables to convert between tox and GHA version literals
15+
py37: 3.7
16+
py38: 3.8
17+
py39: 3.9
18+
py310: "3.10"
19+
py311: "3.11"
20+
pypy3: pypy-3.7
21+
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
25+
matrix:
26+
python-version: [py37, py38, py39, py310, py311, pypy3]
27+
package:
28+
- "urllib"
29+
- "urllib3"
30+
- "wsgi"
31+
- "distro"
32+
- "richconsole"
33+
- "prometheus-remote-write"
34+
- "sdkextension-aws"
35+
- "propagator-aws-xray"
36+
- "propagator-ot-trace"
37+
- "resource-detector-container"
38+
os: [ubuntu-20.04]
39+
steps:
40+
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
41+
uses: actions/checkout@v2
42+
- name: Set up Python ${{ env[matrix.python-version] }}
43+
uses: actions/setup-python@v4
44+
with:
45+
python-version: ${{ env[matrix.python-version] }}
46+
- name: Install tox
47+
run: pip install tox==3.27.1 tox-factor
48+
- name: Cache tox environment
49+
# Preserves .tox directory between runs for faster installs
50+
uses: actions/cache@v1
51+
with:
52+
path: |
53+
.tox
54+
~/.cache/pip
55+
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
56+
- name: run tox
57+
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json

.github/workflows/test.yml

-135
Original file line numberDiff line numberDiff line change
@@ -9,141 +9,6 @@ env:
99
CORE_REPO_SHA: 84c0e4f38d4fcdb8c13fd3988469fbb8cda28150
1010

1111
jobs:
12-
build:
13-
env:
14-
# We use these variables to convert between tox and GHA version literals
15-
py37: 3.7
16-
py38: 3.8
17-
py39: 3.9
18-
py310: "3.10"
19-
py311: "3.11"
20-
pypy3: pypy-3.7
21-
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
22-
runs-on: ${{ matrix.os }}
23-
strategy:
24-
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
25-
matrix:
26-
python-version: [py37, py38, py39, py310, py311, pypy3]
27-
package:
28-
- "aiohttp-client"
29-
- "aiohttp-server"
30-
- "aiopg"
31-
- "aio-pika"
32-
- "asgi"
33-
- "asyncpg"
34-
- "aws-lambda"
35-
- "boto"
36-
- "boto3sqs"
37-
- "botocore"
38-
- "cassandra"
39-
- "celery"
40-
- "confluent-kafka"
41-
- "dbapi"
42-
- "django"
43-
- "elasticsearch"
44-
- "falcon"
45-
- "fastapi"
46-
- "flask"
47-
- "grpc"
48-
- "httpx"
49-
- "jinja2"
50-
- "kafka-python"
51-
- "logging"
52-
- "mysql"
53-
- "mysqlclient"
54-
- "pika"
55-
- "psycopg2"
56-
- "pymemcache"
57-
- "pymongo"
58-
- "pymysql"
59-
- "pyramid"
60-
- "redis"
61-
- "remoulade"
62-
- "requests"
63-
- "sklearn"
64-
- "sqlalchemy"
65-
- "sqlite3"
66-
- "starlette"
67-
- "system-metrics"
68-
- "tornado"
69-
- "tortoiseorm"
70-
- "urllib"
71-
- "urllib3"
72-
- "wsgi"
73-
- "distro"
74-
- "richconsole"
75-
- "prometheus-remote-write"
76-
- "sdkextension-aws"
77-
- "propagator-aws-xray"
78-
- "propagator-ot-trace"
79-
- "resource-detector-container"
80-
os: [ubuntu-20.04]
81-
steps:
82-
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
83-
uses: actions/checkout@v2
84-
- name: Set up Python ${{ env[matrix.python-version] }}
85-
uses: actions/setup-python@v4
86-
with:
87-
python-version: ${{ env[matrix.python-version] }}
88-
- name: Install tox
89-
run: pip install tox==3.27.1 tox-factor
90-
- name: Cache tox environment
91-
# Preserves .tox directory between runs for faster installs
92-
uses: actions/cache@v1
93-
with:
94-
path: |
95-
.tox
96-
~/.cache/pip
97-
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
98-
- name: run tox
99-
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
100-
# - name: Find and merge ${{ matrix.package }} benchmarks
101-
# # TODO: Add at least one benchmark to every package type to remove this (#249)
102-
# if: matrix.package == 'sdkextension' || matrix.package == 'propagator'
103-
# run: >-
104-
# mkdir -p benchmarks;
105-
# jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
106-
# | if .[0].benchmarks == null then null else .[0] end'
107-
# **/**/tests/*${{ matrix.package }}*-benchmark.json > benchmarks/output_${{ matrix.package }}.json
108-
# - name: Upload all benchmarks under same key as an artifact
109-
# if: ${{ success() }}
110-
# uses: actions/upload-artifact@v2
111-
# with:
112-
# name: benchmarks
113-
# path: benchmarks/output_${{ matrix.package }}.json
114-
# combine-benchmarks:
115-
# runs-on: ubuntu-latest
116-
# needs: build
117-
# if: ${{ always() }}
118-
# name: Combine benchmarks from previous build job
119-
# steps:
120-
# - name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
121-
# uses: actions/checkout@v2
122-
# - name: Download all benchmarks as artifact using key
123-
# uses: actions/download-artifact@v2
124-
# with:
125-
# name: benchmarks
126-
# path: benchmarks
127-
# - name: Find and merge all benchmarks
128-
# run: >-
129-
# jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
130-
# | if .[0].benchmarks == null then null else .[0] end'
131-
# benchmarks/output_*.json > output.json;
132-
# - name: Report on benchmark results
133-
# uses: benchmark-action/github-action-benchmark@v1
134-
# with:
135-
# name: OpenTelemetry Python Benchmarks - Python ${{ env[matrix.python-version ]}} - ${{ matrix.package }}
136-
# tool: pytest
137-
# output-file-path: output.json
138-
# github-token: ${{ secrets.GITHUB_TOKEN }}
139-
# max-items-in-chart: 100
140-
# # Alert with a commit comment on possible performance regression
141-
# alert-threshold: 200%
142-
# fail-on-alert: true
143-
# # Make a commit on `gh-pages` with benchmarks from previous step
144-
# auto-push: ${{ github.ref == 'refs/heads/main' }}
145-
# gh-pages-branch: gh-pages
146-
# benchmark-data-dir-path: benchmarks
14712
misc:
14813
strategy:
14914
fail-fast: false

0 commit comments

Comments
 (0)