Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 81 additions & 3 deletions .github/workflows/e2e-vitest-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
hermes_selected: ${{ steps.matrix.outputs.hermes_selected }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
Expand All @@ -88,15 +89,39 @@ jobs:
run: |
set -euo pipefail
args=(--emit-live-matrix)
matrix=""
hermes_selected=false
if [ -n "${SCENARIOS}" ]; then
if [[ ! "${SCENARIOS}" =~ ^[A-Za-z0-9_-]+(,[A-Za-z0-9_-]+)*$ ]]; then
echo "::error::Invalid scenario input: ${SCENARIOS}" >&2
exit 1
fi
args+=(--scenarios "${SCENARIOS}")
registry_scenarios=()
IFS=, read -r -a selected_scenarios <<< "${SCENARIOS}"
for scenario in "${selected_scenarios[@]}"; do
case "${scenario}" in
hermes-e2e)
# Free-standing live Vitest job below; not registry-driven.
hermes_selected=true
;;
*)
registry_scenarios+=("${scenario}")
;;
esac
done
if [ "${#registry_scenarios[@]}" -gt 0 ]; then
registry_csv=$(IFS=,; echo "${registry_scenarios[*]}")
args+=(--scenarios "${registry_csv}")
matrix="$(npx tsx test/e2e-scenario/scenarios/run.ts "${args[@]}")"
else
matrix="[]"
fi
else
hermes_selected=true
matrix="$(npx tsx test/e2e-scenario/scenarios/run.ts "${args[@]}")"
fi
matrix="$(npx tsx test/e2e-scenario/scenarios/run.ts "${args[@]}")"
echo "matrix=${matrix}" >> "$GITHUB_OUTPUT"
echo "hermes_selected=${hermes_selected}" >> "$GITHUB_OUTPUT"
MATRIX_JSON="${matrix}" python - <<'PY' >> "$GITHUB_STEP_SUMMARY"
import json
import os
Expand All @@ -112,7 +137,7 @@ jobs:

live-scenarios:
needs: generate-matrix
if: ${{ inputs.jobs == '' }}
if: ${{ inputs.jobs == '' && needs.generate-matrix.outputs.matrix != '[]' }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
Expand Down Expand Up @@ -298,6 +323,58 @@ jobs:
if-no-files-found: ignore
retention-days: 14

hermes-e2e-vitest:
needs: generate-matrix
if: ${{ needs.generate-matrix.outputs.hermes_selected == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 75
env:
E2E_ARTIFACT_DIR: ${{ github.workspace }}/e2e-artifacts/vitest/hermes-e2e
NEMOCLAW_CLI_BIN: ${{ github.workspace }}/bin/nemoclaw.js
NEMOCLAW_RUN_E2E_SCENARIOS: "1"
NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1"
NEMOCLAW_AGENT: hermes
NEMOCLAW_NON_INTERACTIVE: "1"
NEMOCLAW_RECREATE_SANDBOX: "1"
NEMOCLAW_SANDBOX_NAME: e2e-hermes
NEMOCLAW_MODEL: minimaxai/minimax-m2.7
NEMOCLAW_ONBOARD_VALIDATION_TIMEOUT_SECONDS: "60"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
with:
node-version: 22
cache: npm

- name: Install root dependencies
run: npm ci --ignore-scripts

- name: Build CLI
run: npm run build:cli

- name: Run Hermes live Vitest test
env:
NVIDIA_API_KEY: ${{ secrets.NVIDIA_API_KEY }}
run: |
set -euo pipefail
npx vitest run --project e2e-scenarios-live \
test/e2e-scenario/live/hermes-e2e.test.ts \
--silent=false --reporter=default

- name: Upload Hermes live Vitest artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: e2e-vitest-scenarios-hermes-e2e
path: e2e-artifacts/vitest/hermes-e2e/
include-hidden-files: false
if-no-files-found: ignore
retention-days: 14

# Focused coverage slice for the #2603/#3145 OpenClaw websocket
# protocol/history contract. The retained legacy bash lane remains the
# source for full closeout until a later PR proves replacement and deletes it.
Expand Down Expand Up @@ -481,6 +558,7 @@ jobs:
live-scenarios,
openshell-version-pin-vitest,
onboard-negative-paths-vitest,
hermes-e2e-vitest,
openclaw-tui-chat-correlation-vitest,
gateway-guard-recovery,
]
Expand Down
Loading
Loading