test(ci): prepare pinned Git before Windows installer stages

This commit is contained in:
ethernet
2026-09-24 05:44:53 -04:00
parent 792a4e63a1
commit 4ffba2c882
2 changed files with 9 additions and 1 deletions

View File

@@ -81,7 +81,10 @@ jobs:
- name: Set up locked Python and test dependencies
uses: ./.github/actions/setup-pm
with:
packages: ripgrep
# Installer stage tests inherit setup-pm's HERMES_RUNTIME_DIR. Prepare
# the verified Git pin once, before per-file parallelism; otherwise
# each isolated PowerShell stage races to download/extract the archive.
packages: ${{ matrix.marker == 'windows' && 'git,ripgrep' || 'ripgrep' }}
extras: '["all", "telegram", "anthropic", "mistral", "fal", "modal", "daytona", "hindsight", "parallel-web"]'
test-environment: 'true'
prune-python-cache: true

View File

@@ -43,6 +43,11 @@ def test_stage_processes_restore_pinned_git_and_never_fall_back(tmp_path):
stage("prerequisites")
staged = list(store.glob("git-*/cmd/git.exe"))
assert len(staged) == 1
# A wrong Git earlier on the parent's PATH must not win in either new stage.
poison = tmp_path / "poison"
poison.mkdir()
(poison / "git.cmd").write_text("@echo unpinned git invoked 1>&2 & exit /b 73\r\n", encoding="utf-8")
env["PATH"] = str(poison) + os.pathsep + env["PATH"]
stage("repository") # new process; prerequisites' PATH cannot propagate
stage("complete") # the marker's bare git call is also a new process
checkout = home / "hermes-agent"