Skip to content

Commit

Permalink
Rename to generate-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Jul 24, 2024
1 parent ad6dbc9 commit 69810b8
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 7 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/contrib_0.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do not edit this file.
# This file is generated automatically by executing tox -e generate_workflows
# This file is generated automatically by executing tox -e generate-workflows

name: Contrib 0

Expand Down Expand Up @@ -659,6 +659,34 @@ jobs:
- name: Run tests
run: tox -e py38-test-instrumentation-fastapi -- -ra

py38-test-instrumentation-fastapi-slim:
name: instrumentation-fastapi-slim
runs-on: ubuntu-latest
steps:
- name: Checkout contrib repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
uses: actions/checkout@v4
with:
repository: open-telemetry/opentelemetry-python-contrib
ref: ${{ env.CONTRIB_REPO_SHA }}

- name: Checkout core repo @ SHA - ${{ github.sha }}
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:
python-version: "3.8"
architecture: "x64"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py38-test-instrumentation-fastapi-slim -- -ra

py38-test-instrumentation-flask-0:
name: instrumentation-flask-0
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_0.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do not edit this file.
# This file is generated automatically by executing tox -e generate_workflows
# This file is generated automatically by executing tox -e generate-workflows

name: Lint 0

Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/misc_0.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do not edit this file.
# This file is generated automatically by executing tox -e generate_workflows
# This file is generated automatically by executing tox -e generate-workflows

name: Misc 0

Expand Down Expand Up @@ -176,3 +176,24 @@ jobs:

- name: Run tests
run: tox -e shellcheck -- -ra

generate-workflows:
name: generate-workflows
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 generate-workflows -- -ra

- name: Check workflows are up to date
run: git diff --exit-code || (echo 'Generated workflows are out of date, run "tox -e generate-workflows" and commit the changes in this PR.' && exit 1)
2 changes: 1 addition & 1 deletion .github/workflows/test_0.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do not edit this file.
# This file is generated automatically by executing tox -e generate_workflows
# This file is generated automatically by executing tox -e generate-workflows

name: Test 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_1.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do not edit this file.
# This file is generated automatically by executing tox -e generate_workflows
# This file is generated automatically by executing tox -e generate-workflows

name: Test 1

Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ envlist =
docker-tests-proto{3,4}
public-symbols-check
shellcheck
generate-workflows

[testenv]
deps =
Expand All @@ -126,7 +127,7 @@ setenv =
; override CONTRIB_REPO_SHA via env variable when testing other branches/commits than main
; i.e: CONTRIB_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e <env to test>
; CONTRIB_REPO_SHA={env:CONTRIB_REPO_SHA:main}
CONTRIB_REPO_SHA=22912ef68ff72f75f1126ab2f39b8237b47bae92
CONTRIB_REPO_SHA=c1dab5d39a36f1257aae7c9425b23ec672272966
CONTRIB_REPO=git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}
mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/opentelemetry-test-utils/src/

Expand Down Expand Up @@ -428,7 +429,7 @@ deps =
commands =
python {toxinidir}/scripts/public_symbols_checker.py

[testenv:generate_workflows]
[testenv:generate-workflows]

commands_pre =
pip install -e {env:CONTRIB_REPO}\#egg=generate_workflows_lib&subdirectory=.github/workflows/generate_workflows_lib
Expand Down

0 comments on commit 69810b8

Please sign in to comment.