Skip to content

Commit

Permalink
Merge branch 'main' into add-type-hints-to-starlette
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx authored Nov 28, 2024
2 parents 12f2017 + 8656a06 commit b3fc84d
Show file tree
Hide file tree
Showing 26 changed files with 2,707 additions and 179 deletions.
1,934 changes: 1,934 additions & 0 deletions .github/workflows/core_contrib_test_0.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .github/workflows/generate_workflows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path

from generate_workflows_lib import (
generate_contrib_workflow,
generate_lint_workflow,
generate_misc_workflow,
generate_test_workflow,
Expand All @@ -12,3 +13,4 @@
generate_test_workflow(tox_ini_path, workflows_directory_path, "ubuntu-latest")
generate_lint_workflow(tox_ini_path, workflows_directory_path)
generate_misc_workflow(tox_ini_path, workflows_directory_path)
generate_contrib_workflow(workflows_directory_path)
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ def get_misc_job_datas(tox_envs: list) -> list:


def _generate_workflow(
job_datas: list, name: str, workflow_directory_path: Path
job_datas: list, name: str, workflow_directory_path: Path, max_jobs=250
):
# Github seems to limit the amount of jobs in a workflow file, that is why
# they are split in groups of 250 per workflow file.
for file_number, job_datas in enumerate(
[
job_datas[index : index + 250]
for index in range(0, len(job_datas), 250)
job_datas[index : index + max_jobs]
for index in range(0, len(job_datas), max_jobs)
]
):
with open(
Expand Down Expand Up @@ -219,7 +219,7 @@ def generate_contrib_workflow(
get_contrib_job_datas(
get_tox_envs(Path(__file__).parent.joinpath("tox.ini"))
),
"contrib",
"core_contrib_test",
workflow_directory_path,
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Do not edit this file.
# This file is generated automatically by executing tox -e generate-workflows

name: Contrib {{ file_number }}
name: Core Contrib Test {{ file_number }}

on:
push:
branches-ignore:
- 'release/*'
pull_request:

workflow_call:
inputs:
CORE_REPO_SHA:
required: true
type: string
CONTRIB_REPO_SHA:
required: true
type: string
env:
CORE_REPO_SHA: ${% raw %}{{ github.sha }}{% endraw %}
CONTRIB_REPO_SHA: main
CORE_REPO_SHA: ${% raw %}{{ inputs.CORE_REPO_SHA }}{% endraw %}
CONTRIB_REPO_SHA: ${% raw %}{{ inputs.CONTRIB_REPO_SHA }}{% endraw %}
PIP_EXISTS_ACTION: w

jobs:
Expand All @@ -27,12 +30,6 @@ jobs:
repository: open-telemetry/opentelemetry-python-contrib
ref: ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}

- name: Checkout core repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
uses: actions/checkout@v4
with:
repository: open-telemetry/opentelemetry-python
path: opentelemetry-python-core

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
run: git checkout ${% raw %}{{ github.event.pull_request.head.sha }}{% endraw %}
{%- endif %}

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/lint_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,24 @@ jobs:
- name: Run tests
run: tox -e lint-instrumentation-boto

lint-instrumentation-click:
name: instrumentation-click
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e lint-instrumentation-click

lint-instrumentation-elasticsearch:
name: instrumentation-elasticsearch
runs-on: ubuntu-latest
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/misc_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand All @@ -41,10 +41,10 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand All @@ -61,10 +61,10 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand All @@ -79,10 +79,10 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand All @@ -103,10 +103,10 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand All @@ -124,10 +124,10 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand All @@ -142,10 +142,10 @@ jobs:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand Down
Loading

0 comments on commit b3fc84d

Please sign in to comment.