Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
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
66 changes: 64 additions & 2 deletions .github/workflows/e2e-vitest-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
required: false
default: ""
type: string
jobs:
description: "Optional comma-separated free-standing live Vitest job ids. Empty runs all enabled jobs."
required: false
default: ""
type: string
pr_number:
description: Optional PR number for selective-dispatch result comments.
required: false
Expand All @@ -21,7 +26,7 @@ permissions:
contents: read

concurrency:
group: e2e-vitest-scenarios-${{ github.ref }}-${{ inputs.scenarios || 'supported' }}
group: e2e-vitest-scenarios-${{ github.ref }}-${{ inputs.scenarios || 'supported' }}-${{ inputs.jobs || 'all-jobs' }}
cancel-in-progress: false

jobs:
Expand All @@ -47,6 +52,7 @@ jobs:
name: Generate Vitest scenario matrix
env:
SCENARIOS: ${{ inputs.scenarios }}
JOBS: ${{ inputs.jobs }}
run: |
set -euo pipefail
args=(--emit-live-matrix)
Expand All @@ -57,6 +63,10 @@ jobs:
fi
args+=(--scenarios "${SCENARIOS}")
fi
if [ -n "${JOBS}" ] && [[ ! "${JOBS}" =~ ^[A-Za-z0-9_-]+(,[A-Za-z0-9_-]+)*$ ]]; then
echo "::error::Invalid jobs input: ${JOBS}" >&2
exit 1
fi
matrix="$(npx tsx test/e2e-scenario/scenarios/run.ts "${args[@]}")"
echo "matrix=${matrix}" >> "$GITHUB_OUTPUT"
MATRIX_JSON="${matrix}" python - <<'PY' >> "$GITHUB_STEP_SUMMARY"
Expand All @@ -74,6 +84,7 @@ jobs:

live-scenarios:
needs: generate-matrix
if: ${{ inputs.jobs == '' }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
Expand Down Expand Up @@ -174,6 +185,7 @@ jobs:
# because the matrix above only runs registry-scenarios.test.ts. Modeled on
# #5049's free-standing pattern.
openshell-version-pin-vitest:
if: ${{ inputs.jobs == '' || contains(format(',{0},', inputs.jobs), ',openshell-version-pin-vitest,') }}
runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand Down Expand Up @@ -213,6 +225,7 @@ jobs:
retention-days: 14

onboard-negative-paths-vitest:
if: ${{ inputs.jobs == '' || contains(format(',{0},', inputs.jobs), ',onboard-negative-paths-vitest,') }}
runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand Down Expand Up @@ -255,11 +268,58 @@ jobs:
if-no-files-found: ignore
retention-days: 14

inference-routing-vitest:
if: ${{ inputs.jobs == '' || contains(format(',{0},', inputs.jobs), ',inference-routing-vitest,') }}
runs-on: ubuntu-latest
timeout-minutes: 45
env:
E2E_ARTIFACT_DIR: ${{ github.workspace }}/e2e-artifacts/vitest/inference-routing
NEMOCLAW_RUN_E2E_SCENARIOS: "1"
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 inference routing live test
# Direct Vitest coverage for test/e2e/test-inference-routing.sh. The
# always-on PR-safe slices prove invalid-key and unreachable-endpoint
# classification/cleanup without spending live provider quota; real
# NVIDIA credential isolation and third-party provider smokes stay
# skipped unless their secrets are explicitly supplied by a future
# workflow.
run: |
set -euo pipefail
npx vitest run --project e2e-scenarios-live \
test/e2e-scenario/live/inference-routing.test.ts \
--silent=false --reporter=default

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

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
# 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.
openclaw-tui-chat-correlation-vitest:
if: ${{ inputs.scenarios == '' }}
if: ${{ inputs.jobs == '' || contains(format(',{0},', inputs.jobs), ',openclaw-tui-chat-correlation-vitest,') }}
runs-on: ubuntu-latest
timeout-minutes: 75
env:
Expand Down Expand Up @@ -338,6 +398,7 @@ jobs:
# restore the /tmp guard chain after pod recreate). Will fail on `main`
# until the #2701 fix lands; flips green afterwards.
gateway-guard-recovery:
if: ${{ inputs.jobs == '' || contains(format(',{0},', inputs.jobs), ',gateway-guard-recovery,') }}
runs-on: ubuntu-latest
timeout-minutes: 45
env:
Expand Down Expand Up @@ -435,6 +496,7 @@ jobs:
openshell-version-pin-vitest,
onboard-negative-paths-vitest,
openclaw-tui-chat-correlation-vitest,
inference-routing-vitest,
gateway-guard-recovery,
]
if: ${{ always() && github.event_name == 'workflow_dispatch' }}
Expand Down
Loading
Loading