ci(windows): run E2E on PM test environment and platform markers

This commit is contained in:
ethernet
2026-09-24 07:49:06 -04:00
parent 090dd24638
commit f689044ef2

View File

@@ -173,9 +173,9 @@ jobs:
# `hermes serve`, `hermes gateway run/stop`, the tui_gateway stdio process, cron script
# jobs, the terminal tool's Git Bash / PowerShell / cmd children and a ConPTY console,
# all against the loopback fake provider (tests/fakes/fake_llm_provider.py). Separate
# from os-tests above: those are unit-level windows_only tests, these spawn process
# from os-tests above: those are unit-level Windows tests, these spawn process
# trees per test. Every file there is also marked `integration`, so os-tests'
# `-m "windows_only and not integration"` never runs them a second time.
# `-m "platforms and not integration"` never runs them a second time.
#
# One pytest process per FILE, in parallel (same model as the Linux `e2e` job): the
# files spawn their own trees and must not share interpreter state. No retries: a
@@ -191,71 +191,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # 8.2.0
- name: Set up locked Python and test dependencies
uses: ./.github/actions/setup-pm
with:
version: "0.9.28"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Set up Python 3.11
uses: ./.github/actions/retry
with:
command: uv python install 3.11
- name: Install dependencies
# Same extras as os-tests: serve needs the web stack, the gateway the messaging
# imports, and the ConPTY case pywinpty (a core dependency on win32).
uses: ./.github/actions/retry
with:
command: uv sync --locked --python 3.11 --extra all --extra dev --extra anthropic --extra mistral --extra fal --extra modal --extra daytona --extra parallel-web
- name: Minimize uv cache
run: uv cache prune --ci
packages: git,ripgrep
extras: '["all", "telegram", "anthropic", "mistral", "fal", "modal", "daytona", "hindsight", "parallel-web"]'
test-environment: 'true'
prune-python-cache: true
- name: Run Windows E2E suite
shell: bash
run: |
set -uo pipefail
logs="${RUNNER_TEMP}/e2e-windows"
mkdir -p "$logs"
files=$(find tests/e2e/core/windows -name 'test_*.py' | sort)
if [ -z "$files" ]; then
echo "::error::no test files under tests/e2e/core/windows"
exit 1
fi
pids=()
names=()
start=$SECONDS
for f in $files; do
# `-m windows_only` replaces pyproject's `not integration` addopts selector.
timeout 900 .venv/Scripts/python.exe -m pytest "$f" -m windows_only \
-p no:cacheprovider -v --tb=short -rA > "$logs/$(basename "$f" .py).log" 2>&1 &
pids+=($!)
names+=("$f")
done
fail=0
for i in "${!pids[@]}"; do
rc=0
wait "${pids[$i]}" || rc=$?
f="${names[$i]}"
echo "::group::$f (rc=$rc)"
cat "$logs/$(basename "$f" .py).log"
echo "::endgroup::"
if [ "$rc" -eq 5 ]; then
echo "::error::$f selected zero tests (marker renamed or selection broken)"
fail=1
elif [ "$rc" -ne 0 ]; then
echo "::error::$f failed (rc=$rc)"
grep -E '^(FAILED|ERROR) ' "$logs/$(basename "$f" .py).log" || true
fail=1
fi
done
echo "Windows E2E wall: $((SECONDS - start)) s"
exit "$fail"
scripts/run_tests.sh tests/e2e/core/windows/ -- \
-m "platforms and integration" -v --tb=short -rA
env:
HERMES_TEST_WORKERS: '6'
HERMES_TEST_FILE_TIMEOUT: '900'
HERMES_TEST_FILE_RETRIES: '0'
OPENROUTER_API_KEY: ""
OPENAI_API_KEY: ""
NOUS_API_KEY: ""