fix: resolve GitHub Actions CI collection and flakiness issues
PiperOrigin-RevId: 960108371
This commit is contained in:
committed by
Copybara-Service
parent
e300ae7aa6
commit
4e65350eee
@@ -145,10 +145,12 @@ jobs:
|
||||
source .venv/bin/activate
|
||||
uv sync --extra test
|
||||
|
||||
- name: List installed packages
|
||||
run: uv pip list
|
||||
|
||||
- name: Run unit tests with pytest
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
pytest tests/unittests \
|
||||
uv run pytest tests/unittests \
|
||||
-n auto \
|
||||
--ignore=tests/unittests/artifacts/test_artifact_service.py \
|
||||
--ignore=tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py
|
||||
@@ -185,10 +187,13 @@ jobs:
|
||||
source .venv/bin/activate
|
||||
uv sync --extra test
|
||||
|
||||
- name: List installed packages (before reinstall)
|
||||
run: uv pip list
|
||||
|
||||
- name: Run A2A tests against a2a-sdk v0.3
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
uv pip install --reinstall-package a2a-sdk 'a2a-sdk>=0.3.4,<0.4'
|
||||
pytest tests/unittests/a2a \
|
||||
uv pip list
|
||||
uv run pytest tests/unittests/a2a \
|
||||
tests/unittests/agents/test_remote_a2a_agent.py \
|
||||
tests/unittests/integrations/agent_registry/test_agent_registry.py
|
||||
|
||||
@@ -50,7 +50,11 @@ def get_test_files():
|
||||
"""Yields (sample_dir, test_file_path)."""
|
||||
if not CONTRIBUTING_DIR.exists():
|
||||
return
|
||||
for test_file in CONTRIBUTING_DIR.rglob("tests/*.json"):
|
||||
# Sort files to ensure deterministic order across pytest-xdist workers
|
||||
test_files = sorted(
|
||||
CONTRIBUTING_DIR.rglob("tests/*.json"), key=lambda p: p.as_posix()
|
||||
)
|
||||
for test_file in test_files:
|
||||
sample_dir = test_file.parent.parent
|
||||
if (
|
||||
(sample_dir / "agent.py").exists()
|
||||
|
||||
Reference in New Issue
Block a user