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
73 changes: 0 additions & 73 deletions .github/actions/notify-slack/action.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/daily.yml

This file was deleted.

22 changes: 2 additions & 20 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ on:
description: 'pytest -m expression (e.g., `not integration` or `integration`)'
required: true
type: string
pytest-params:
description: 'additional pytest params'
required: false
default: ""
type: string
notify-on-failure:
description: 'Post to Slack on test failure'
required: false
default: false
type: boolean
environment:
description: 'Environment the test job runs in, for its provider keys; empty runs it in none'
required: false
Expand Down Expand Up @@ -144,14 +134,6 @@ jobs:
# Unit tests spread over every core; integration tests stay serial so the providers'
# rate limits see one caller.
- name: Run core tests
run: uv run --no-sync pytest -m "${{ inputs.marker }}" ${{ inputs.marker != 'integration' && '-n auto --dist worksteal' || '' }} tests/ ${{ inputs.pytest-params }}
run: uv run --no-sync pytest -m "${{ inputs.marker }}" ${{ inputs.marker != 'integration' && '-n auto --dist worksteal' || '' }} tests/
- name: Run plugin tests
run: uv run --no-sync pytest -m "${{ inputs.marker }}" ${{ inputs.marker != 'integration' && '-n auto --dist worksteal' || '' }} plugins/*/tests/*.py ${{ inputs.pytest-params }}
- name: Notify Slack on failure
if: failure() && inputs.notify-on-failure
uses: ./.github/actions/notify-slack
with:
workflow-name: ${{ github.workflow }}
report-file: .report.json
summary: "${{ github.workflow }} failed"
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
run: uv run --no-sync pytest -m "${{ inputs.marker }}" ${{ inputs.marker != 'integration' && '-n auto --dist worksteal' || '' }} plugins/*/tests/*.py
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ profile.html

.uv-cache/

# pytest json report
.report.json
.cursor/

# Code generators fetched on demand, not vendored. See sdks/swift/README.md.
Expand Down
89 changes: 0 additions & 89 deletions dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Essential dev commands for testing, linting, and type checking
"""

import datetime
import json
import os
import shlex
import subprocess
Expand Down Expand Up @@ -281,92 +279,5 @@ def check():
click.echo("\n✅ All checks passed!")


def _extract_first_failure(
tests: list[dict],
) -> tuple[str, str, str] | tuple[None, None, None]:
"""
Return (nodeid, phase, message) for first failed test,
checking setup → call → teardown.
"""
for t in tests:
if t.get("outcome") in ("failed", "error"):
nodeid = t.get("nodeid", "unknown test")

for phase in ["setup", "call", "teardown"]:
phase_data = t.get(phase)
if phase_data and phase_data.get("outcome") == "failed":
longrepr = phase_data.get("longrepr", "")
if isinstance(longrepr, dict):
message = longrepr.get("reprcrash", {}).get(
"message", str(longrepr)
)
else:
message = str(longrepr)

return nodeid, phase, message

return nodeid, "unknown", "No error details available"

return None, None, None


@cli.command()
@click.option(
"--file",
"report_file",
default=".report.json",
type=click.File("r"),
show_default=True,
help="Path to pytest JSON report file",
)
def parse_pytest_report(report_file):
"""Parse pytest JSON report and print summary for CI (GitHub Actions friendly)."""
report = json.load(report_file)

summary = report.get("summary", {})
duration = str(datetime.timedelta(seconds=report.get("duration", 0)))
exit_code = report.get("exitcode", 0)

failed = summary.get("failed", 0)
error = summary.get("error", 0)
passed = summary.get("passed", 0)
skipped = summary.get("skipped", 0)
total = summary.get("total", 0)

# Header
status = (
"❌ Test Results - Failed" if failed or error else "✅ Test Results - Success"
)
click.echo(f"*{status}*")
click.echo()

# Duration
click.echo(f"*Duration:* {duration}")
click.echo()

# Summary
click.echo("*Summary:*")
click.echo(f"* *Total:* {total}")
click.echo(f"* *Passed:* {passed}")
click.echo(f"* *Failed:* {failed}")
click.echo(f"* *Error:* {error}")
click.echo(f"* *Skipped:* {skipped}")
click.echo()

# Failure details
if failed or error:
nodeid, phase, message = _extract_first_failure(report.get("tests", []))

click.echo("*Failure Details:*")
click.echo(f"* *Exit code:* `{exit_code}`")

if nodeid:
click.echo(f"* *First failed test:* `{nodeid}`")
if phase:
click.echo(f"* *Phase:* `{phase}`")
if message:
click.echo(f"* *Error:*\n\n```\n{message}\n```")


if __name__ == "__main__":
cli()
2 changes: 1 addition & 1 deletion plugins/sample_plugin/tests/test_example_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestExamplePlugin:
def test_regular(self):
assert True

# example integration test (run daily on CI)
# example integration test (run on CI when a release is published)
@pytest.mark.integration
async def test_simple(self):
assert True
2 changes: 1 addition & 1 deletion sdks/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Source = "https://github.com/GetStream/Vision-Agents"
vision-agents = "vision_agents.cli.main:main"

[project.optional-dependencies]
dev = ["pytest", "pytest-json-report", "mypy", "ruff"]
dev = ["pytest", "mypy", "ruff"]
anthropic = ["vision-agents-plugins-anthropic"]
cartesia = ["vision-agents-plugins-cartesia"]
deepgram = ["vision-agents-plugins-deepgram"]
Expand Down
27 changes: 0 additions & 27 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading