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.

1.0 KB
Raw Blame
from pathlib import Path

import yaml

ROOT = Path(__file__).resolve().parents[3]
WORKFLOW = ROOT / ".github" / "workflows" / "installer-smoke.yml"


def test_forced_installer_smoke_avoids_full_history_checkout() -> None:
    workflow = yaml.safe_load(WORKFLOW.read_text(encoding="utf-8"))
    steps = workflow["jobs"]["changes"]["steps"]

    checkout = next(step for step in steps if step.get("name", "").startswith("Checkout"))
    assert checkout["with"]["fetch-depth"] == 1

    path_gate = next(step for step in steps if step.get("id") == "paths")
    script = path_gate["run"]
    force_short_circuit = script.index('if [ "${{ inputs.force }}" = "true" ]; then')
    event_base_fetch = script.index('git fetch --no-tags --depth=1 origin "$base"')
    main_fetch = script.index("git fetch --no-tags --depth=1 origin main:refs/remotes/origin/main")

    assert force_short_circuit < event_base_fetch < main_fetch
    assert "exit 0" in script[force_short_circuit:event_base_fetch]
    assert 'github.event.before' in script