Skip to content

The agent that grows with you

ci: fix failing tests, move more runners to blacksmith, split windows tests

Maciej Lisiewski3bcc2910ab80
diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml
index 455a5ec3fe5..556d3014780 100644
--- a/.github/actionlint.yaml
+++ b/.github/actionlint.yaml
@@ -3,7 +3,11 @@
# the real findings, unless this file declares it.
self-hosted-runner:
labels:
+ - blacksmith-2vcpu-ubuntu-2404
+ - blacksmith-2vcpu-ubuntu-2404-arm
+ - blacksmith-2vcpu-windows-2025
+ - blacksmith-12vcpu-macos-latest
- blacksmith-32vcpu-ubuntu-2404
- - blacksmith-32vcpu-ubuntu-2404-arm
- blacksmith-32vcpu-windows-2025
- - blacksmith-32vcpu-windows-2025-arm
+ # GitHub larger runners still used by matrices not yet migrated.
+ - windows-latest-32-arm-core
diff --git a/.github/workflows/tests-os.yml b/.github/workflows/tests-os.yml
index 5ae0db3a43f..3764b311545 100644
--- a/.github/workflows/tests-os.yml
+++ b/.github/workflows/tests-os.yml
@@ -95,10 +95,16 @@ jobs:
- name: Windows-only tests
runner: blacksmith-32vcpu-windows-2025
marker: windows
- - name: Windows-only tests (arm64)
+ - name: Windows-only tests (arm64, 1/2)
runner: windows-latest-32-arm-core
marker: windows
timeout: 60
+ slice: 1/2
+ - name: Windows-only tests (arm64, 1/2)
+ runner: windows-latest-32-arm-core
+ marker: windows
+ timeout: 60
+ slice: 2/2
steps:
- name: Checkout code
uses: useblacksmith/checkout@v1
diff --git a/tests/ci/test_clean_worktree_check.py b/tests/ci/test_clean_worktree_check.py
index 465b206096e..1d9634a5af6 100644
--- a/tests/ci/test_clean_worktree_check.py
+++ b/tests/ci/test_clean_worktree_check.py
@@ -16,6 +16,8 @@ from pathlib import Path
import pytest
from ruamel.yaml import YAML
+from tests.ci.workflow_steps import is_checkout
+
ROOT = Path(__file__).resolve().parents[2]
ACTION_DIR = ".github/actions/check-clean-worktree"
ACTION = ROOT / ACTION_DIR / "action.yml"
@@ -32,7 +34,7 @@ def _checkout_jobs():
for filename in WORKFLOWS:
for name, job in (_load(ROOT / ".github/workflows" / filename)["jobs"] or {}).items():
steps = job.get("steps") or [] # reusable-workflow calls have none
- if any(str(step.get("uses", "")).startswith("actions/checkout@") for step in steps):
+ if any(is_checkout(step) for step in steps):
yield f"{filename}:{name}", job, steps
@@ -51,7 +53,7 @@ def test_every_checkout_job_ends_with_the_clean_worktree_step():
problems.append(f"{label}: runs with `if: {last['if']}`; leave `if:` off")
if "mode" in (last.get("with") or {}):
problems.append(f"{label}: passes `mode`; the action's default is the only switch")
- checkout = next(s for s in steps if str(s.get("uses", "")).startswith("actions/checkout@"))
+ checkout = next(s for s in steps if is_checkout(s))
sparse = str((checkout.get("with") or {}).get("sparse-checkout", ""))
if sparse and ACTION_DIR not in sparse.split():
problems.append(f"{label}: sparse checkout omits {ACTION_DIR}, so the step cannot load")
diff --git a/tests/ci/test_stable_release_graph.py b/tests/ci/test_stable_release_graph.py
index 80d190ed555..6fdac1302ee 100644
--- a/tests/ci/test_stable_release_graph.py
+++ b/tests/ci/test_stable_release_graph.py
@@ -10,6 +10,7 @@ from ruamel.yaml import YAML
from scripts.releases import lanes as lane_set
from tests.ci.desktop_release_roles import gate
+from tests.ci.workflow_steps import is_checkout
ROOT = Path(__file__).resolve().parents[2]
@@ -297,7 +298,7 @@ def test_claim_custody_and_final_payload_identity_reach_every_privileged_phase()
def test_docker_dev_stamp_checkout_has_release_history():
build = workflow("docker.yml")["jobs"]["build"]
- checkout = next(step for step in build["steps"] if "actions/checkout@" in step.get("uses", ""))
+ checkout = next(step for step in build["steps"] if is_checkout(step))
assert checkout["with"]["fetch-depth"] == "0"
diff --git a/tests/ci/test_termux_input_archive.py b/tests/ci/test_termux_input_archive.py
index a2bb8e0d59b..2a61494aede 100644
--- a/tests/ci/test_termux_input_archive.py
+++ b/tests/ci/test_termux_input_archive.py
@@ -7,6 +7,7 @@ import pytest
from ruamel.yaml import YAML
from tests.ci.desktop_release_roles import DOWNLOADABLE_DISPATCHES, gate, needs_of
+from tests.ci.workflow_steps import is_checkout
ROOT = Path(__file__).resolve().parents[2]
R2_ENV = {"CLOUDFLARE_R2_ACCOUNT_ID", "CLOUDFLARE_R2_ACCESS_KEY_ID", "CLOUDFLARE_R2_SECRET_ACCESS_KEY", "CLOUDFLARE_R2_BUCKET"}
@@ -65,8 +66,7 @@ def test_archive_gate_uses_bootstrap_python_and_trusted_exact_revision():
assert not gate(archive["if"], {**DOWNLOADABLE_DISPATCHES["tag"], **skipped}, {}, job_if=False), skipped
assert R2_ENV <= archive["env"].keys()
assert validate["environment"] == "release-signing"
- checkout = validate["steps"][0]
- assert "actions/checkout" in checkout["uses"]
+ assert is_checkout(validate["steps"][0])
assert not [name for name, job in release.items() if "archive-inputs" in needs_of(job)]
action = YAML(typ="base").load((ROOT / ".github/actions/setup-pm/action.yml").read_text(encoding="utf-8"))
diff --git a/tests/ci/workflow_steps.py b/tests/ci/workflow_steps.py
index 9b1d34d5875..ef705cef68d 100644
--- a/tests/ci/workflow_steps.py
+++ b/tests/ci/workflow_steps.py
@@ -31,6 +31,15 @@ sleep() { return 1; }
'''
+# Blacksmith runners use its drop-in checkout (same inputs, cached on the runner);
+# GitHub-hosted runners keep actions/checkout.
+CHECKOUT_ACTIONS = ("actions/checkout@", "useblacksmith/checkout@")
+
+
+def is_checkout(step: dict) -> bool:
+ return str(step.get("uses", "")).startswith(CHECKOUT_ACTIONS)
+
+
def required(step: dict, ctx: dict) -> None:
label = step.get("name", step.get("id", "required step"))
assert gha.condition(step.get("if"), ctx), f"{label}: disabled"