Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/scripts/tests/test_lintcommit.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_scope_uppercase() -> None:


def test_subject_uppercase() -> None:
assert validate_subject("feat: Add new feature") == "subject must be lowercase"
assert validate_subject("feat: Add new feature") is None


# region validate_message
Expand Down
18 changes: 18 additions & 0 deletions .github/scripts/tests/test_test_parser_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from pathlib import Path
from typing import Any

import pytest
import yaml

WORKFLOW_PATH = Path(__file__).parents[2] / "workflows" / "test-parser.yml"


@pytest.fixture(name="workflow")
def workflow_fixture() -> dict[Any, Any]:
return yaml.safe_load(WORKFLOW_PATH.read_text())


def test_test_scripts_runs_all_tests_in_directory(workflow: dict[Any, Any]) -> None:
steps = workflow["jobs"]["test-scripts"]["steps"]
run_step = next(step for step in steps if step.get("name") == "Run script tests")
assert run_step["run"].strip() == "python -m pytest .github/scripts/tests"
13 changes: 1 addition & 12 deletions .github/workflows/test-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,4 @@ jobs:
run: uv pip install packaging pytest PyYAML==6.0.2

- name: Run script tests
run: |
python -m pytest \
.github/scripts/tests/test_ai_pr_review_workflow.py \
.github/scripts/tests/test_check_otel_wheel_dependencies.py \
.github/scripts/tests/test_current_latest_version.py \
.github/scripts/tests/test_js_examples.py \
.github/scripts/tests/test_opentelemetry_conformance_workflow.py \
.github/scripts/tests/test_parse_sdk_branch.py \
.github/scripts/tests/test_parse_testing_version.py \
.github/scripts/tests/test_release_workflow_dependencies.py \
.github/scripts/tests/e2e/test_ecr_release_workflow.py \
.github/scripts/tests/test_shared_workflow_runners.py
run: python -m pytest .github/scripts/tests