Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(ci): install pytest in the agent runtimes canary (#943)

Ruben Lütke54acba249cd3
diff --git a/.github/workflows/agent-runtimes-canary.yml b/.github/workflows/agent-runtimes-canary.yml
index 40a2d525c1..eac877e90a 100644
--- a/.github/workflows/agent-runtimes-canary.yml
+++ b/.github/workflows/agent-runtimes-canary.yml
@@ -32,8 +32,12 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
+ # agent_runtime_e2e.py ends with `pytest tests/unit/agent_runtimes` on the
+ # same machine, so the test runner must be there like in ci.yml's legs.
- name: Install the base app
- run: python scripts/pip_install.py -e "."
+ run: |
+ python scripts/pip_install.py -e "."
+ python -m pip install pytest pytest-asyncio
# The app's own setup installs whatever the pin names; in this checkout
# only, the pin points at upstream latest (newest OpenClaw on npm, the
# head of Hermes' default branch).
diff --git a/tests/unit/ci/test_agent_runtime_lane.py b/tests/unit/ci/test_agent_runtime_lane.py
index 53a530fb41..2e333696ac 100644
--- a/tests/unit/ci/test_agent_runtime_lane.py
+++ b/tests/unit/ci/test_agent_runtime_lane.py
@@ -237,3 +237,28 @@ def test_the_runtime_pins_ship_in_the_wheel_and_the_frozen_app():
)
spec = (ROOT / "dodaios.spec").read_text(encoding="utf-8")
assert '"dodaios/agent_runtimes/runtime-versions.json"), "dodaios/agent_runtimes")' in spec
+
+
[email protected]("workflow", ["ci.yml", "agent-runtimes-canary.yml"])
+def test_every_e2e_leg_installs_the_test_runner_it_ends_with(workflow):
+ """agent_runtime_e2e.py finishes with ``pytest tests/unit/agent_runtimes``.
+
+ A leg that never installs pytest fails that last step on every OS, which
+ kept the weekly canary red whatever upstream shipped.
+ """
+ path = ROOT / ".github" / "workflows" / workflow
+ jobs = yaml.safe_load(path.read_text(encoding="utf-8"))["jobs"]
+ legs = 0
+ for name, job in jobs.items():
+ runs = [str(step.get("run", "")) for step in job.get("steps", [])]
+ e2e = [
+ i
+ for i, run in enumerate(runs)
+ if "agent_runtime_e2e.py" in run and "--expect-setup-failure" not in run
+ ]
+ if not e2e:
+ continue
+ legs += 1
+ before = "\n".join(runs[: e2e[0]])
+ assert "pip install pytest" in before, f"{workflow}:{name} runs the e2e without pytest"
+ assert legs, f"{workflow} has no agent_runtime_e2e.py leg"