Files
hermes-agent/.github/workflows/windows-venv-e2e.yml
2026-10-15 05:23:51 -07:00

110 lines
4.5 KiB
YAML

name: Windows venv-holder live E2E
# ON-DEMAND ONLY (fleet-update #91277, venv-holder consolidation work).
#
# Runs the live venv-holder E2E suite on a real windows-latest runner:
# spawns actual processes with realistic Hermes argv shapes and drives the
# REAL detection/classification/exemption code against the live process
# table — the coverage that cannot exist on the Linux lanes and that the
# maintainer cannot exercise locally before the work reaches main.
#
# Deliberately NOT wired to pull_request/main: it fires only on pushes to
# wine2e/** working branches, so it costs nothing on normal PRs. Delete or
# keep dormant after the venv-holder work lands.
on:
push:
branches:
- 'wine2e/**'
workflow_call:
inputs:
commit:
description: Commit to test and build. Empty keeps the triggering commit.
type: string
default: ''
release:
description: 'Stable-release candidate run. Unused by the jobs; the caller passes it for a uniform callable surface.'
required: false
type: boolean
default: false
permissions:
contents: read
# A workflow_call run (stable release) shares the caller's commit; its group
# includes github.run_id so a rerun of the parent gets a fresh group instead
# of cancelling this child mid-flight. wine2e push runs keep ref-scoped
# collapse as before.
concurrency:
group: windows-venv-e2e-${{ inputs.release == true && github.run_id || github.ref }}
cancel-in-progress: ${{ inputs.release != true }}
jobs:
venv-holder-e2e:
name: venv-holder live E2E (windows-latest)
runs-on: blacksmith-32vcpu-windows-2025
timeout-minutes: 25
steps:
- name: Checkout code
uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1
with:
# The stable caller dispatches on the candidate tag; github.sha is
# the exact candidate commit there and the head SHA everywhere else.
ref: ${{ inputs.commit || github.sha }}
- name: Set up locked Python and test dependencies
uses: ./.github/actions/setup-pm
with:
extras: '["messaging"]'
test-environment: 'true'
prune-python-cache: true
- name: Run venv-holder live E2E
# Canonical runner (scripts/run_tests.sh) — never bare pytest: it
# enforces credential hygiene, TZ, temp HERMES_HOME and subprocess
# isolation. The live files are host-marked windows-only, so the
# runner collects them on this runner instead of skipping them.
shell: bash
run: |
set -uo pipefail
bash scripts/run_tests.sh \
tests/hermes_cli/test_venv_holder_windows_live.py \
tests/hermes_cli/test_taskkill_identity_windows_live.py \
tests/hermes_cli/test_git_trampoline_windows_live.py \
tests/pm/test_held_entry_windows_live.py
- name: Run Telegram CLOSE-WAIT reconnect live E2E (#87057)
shell: bash
run: |
set -uo pipefail
bash scripts/run_tests.sh tests/gateway/test_telegram_closewait_windows_live.py
- name: Run background-executor spawn parity live E2E (#70716)
shell: bash
run: |
set -uo pipefail
bash scripts/run_tests.sh tests/tools/test_process_registry_windows_live.py
- name: Turn Windows long paths off for later steps (#130242)
# The runner image turns LongPathsEnabled on; 0 is the Windows default
# most users have. A process reads the value when it starts, so only
# later steps see it. Keep this step after every lane that expects the
# image's setting. It does not depend on those lanes passing.
id: long_paths_off
if: ${{ !cancelled() }}
shell: pwsh
run: |
reg add 'HKLM\SYSTEM\CurrentControlSet\Control\FileSystem' /v LongPathsEnabled /t REG_DWORD /d 0 /f
if ($LASTEXITCODE) { exit $LASTEXITCODE }
(Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem').LongPathsEnabled
- name: Run PM long-path live E2E with long paths off (#130242)
# The test first asserts RtlAreLongPathsEnabled() is false in its own
# process, so this step cannot pass if the step above did not take.
# ``-m`` replaces pyproject's addopts, which deselect ``integration``.
if: ${{ !cancelled() && steps.long_paths_off.outcome == 'success' }}
shell: bash
run: |
set -uo pipefail
bash scripts/run_tests.sh tests/pm/test_long_paths_windows_live.py -- -m "platforms and integration" -v