test(ci): prepare pinned Git before Windows installer stages
This commit is contained in:
5
.github/workflows/tests-os.yml
vendored
5
.github/workflows/tests-os.yml
vendored
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user