Files
hermes-agent/.github/workflows/windows-desktop-attach-e2e.yml
alt-glitch e0d13d10fb ci: the remaining workflow copies of recipe commands call the recipes
Nine workflow steps still ran the exact command of an existing recipe:
the tests-js install in the install-e2e workflows (5), the Electron
runtime preparation and the full JS install in js-tests and the Windows
desktop attach E2E (2 each). They now call just js-install-tests,
just electron-runtime and just js-install.

A new desktop-build recipe replaces the `pnpm run build` steps of the
desktop E2E workflows. The contributing guides and the PR template name
just test, just test-all and just check.

`set windows-shell` is dropped: the manual marks it deprecated, and its
value was identical to `set shell`, which applies on Windows when no
Windows setting exists. Checked on a Windows host with just 1.59.0: both
forms run the same bash.
2026-11-09 20:18:44 +05:30

111 lines
4.1 KiB
YAML

name: Windows Desktop attach E2E
# Desktop attaching to a local gateway on a real Windows host (#134889 W3):
# apps/desktop/e2e/core/local-gateway-attach.spec.ts against a gateway that is
# already running (`hermes gateway run`, as a login item or console leaves it),
# driven through Electron main's real attach path (`hermes gateway ensure`, the
# SID-checked named-pipe ticket mint through the runtime helper), first on the
# dev tree, then on the electron-builder `--dir` build of the same commit.
#
# Dispatch-only plus pushes to wine2e-desktop/** (no other workflow listens
# there), for iteration without the rest of CI.
on:
workflow_dispatch:
push:
branches: ['wine2e-desktop/**']
permissions:
contents: read
concurrency:
group: windows-desktop-attach-e2e-${{ github.ref }}
cancel-in-progress: true
jobs:
attach:
name: Desktop attach to a running local gateway (Windows)
runs-on: blacksmith-32vcpu-windows-2025
timeout-minutes: 60
steps:
- uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1
- name: Prepare locked Desktop build and test toolchain
id: pm
uses: ./.github/actions/setup-pm
with:
toolchain: all
extras: '[]'
test-environment: 'true'
# Full install (not --ignore-scripts): native addons need their lifecycle scripts.
- uses: ./.github/actions/retry
with:
command: just js-install
# Electron 42+ has no postinstall; unpack the binary the attach spec launches.
- name: Prepare locked Electron runtime
shell: bash
run: just electron-runtime
- name: Build the desktop app
shell: bash
timeout-minutes: 15
run: just desktop-build
- name: Attach spec on the dev tree
id: dev
working-directory: apps/desktop
shell: bash
timeout-minutes: 15
run: pnpm exec playwright test -c e2e/core/playwright.config.ts local-gateway-attach.spec.ts
env:
CI: 'true'
HERMES_E2E_PYTHON: ${{ steps.pm.outputs.python-path }}
OPENROUTER_API_KEY: ''
OPENAI_API_KEY: ''
NOUS_API_KEY: ''
ANTHROPIC_API_KEY: ''
# The Windows app the way electron-builder lays it out (no msix, unsigned): the packaged
# main bundle, asar and preload, attaching through the same ensure + pipe-ticket path.
- name: Package the desktop app (electron-builder --dir)
if: always() && steps.dev.outcome != 'skipped'
working-directory: apps/desktop
shell: bash
timeout-minutes: 15
run: pnpm run builder --dir --publish never --win --x64
- name: Attach spec on the packaged build
if: always() && steps.dev.outcome != 'skipped'
working-directory: apps/desktop
shell: pwsh
timeout-minutes: 15
run: |
$exe = Get-ChildItem -LiteralPath release -Recurse -Filter '*.exe' |
Where-Object { $_.Directory.Name -like 'win*unpacked' -and $_.Name -notlike 'elevate*' -and $_.Name -notlike 'Uninstall*' } |
Select-Object -First 1
if (-not $exe) { Get-ChildItem -Recurse release | Select-Object -First 50 FullName; throw 'no packaged exe under release/win*-unpacked' }
"packaged exe: $($exe.FullName)"
$env:HERMES_E2E_PACKAGED_EXE = $exe.FullName
pnpm exec playwright test -c e2e/core/playwright.config.ts local-gateway-attach.spec.ts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
env:
CI: 'true'
HERMES_E2E_PYTHON: ${{ steps.pm.outputs.python-path }}
OPENROUTER_API_KEY: ''
OPENAI_API_KEY: ''
NOUS_API_KEY: ''
ANTHROPIC_API_KEY: ''
- name: Upload failure artifacts
if: failure() || cancelled()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: windows-desktop-attach-e2e-${{ github.run_attempt }}
path: |
apps/desktop/test-results/core
apps/desktop/playwright-report/core
retention-days: 14
if-no-files-found: ignore