Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
57 changes: 55 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,51 @@ jobs:
if-no-files-found: ignore
retention-days: 14

runtime-overrides-vitest:
if: ${{ inputs.jobs == '' || contains(format(',{0},', inputs.jobs), ',runtime-overrides-vitest,') }}
runs-on: ubuntu-latest
timeout-minutes: 45
env:
E2E_ARTIFACT_DIR: ${{ github.workspace }}/e2e-artifacts/vitest/runtime-overrides
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: Run runtime overrides live test
# Migrated from test/e2e/test-runtime-overrides.sh. Builds the real
# sandbox image and exercises the runtime ENTRYPOINT override boundary.
run: |
set -euo pipefail
npx vitest run --project e2e-scenarios-live \
test/e2e-scenario/live/runtime-overrides.test.ts \
--silent=false --reporter=default

- name: Upload runtime overrides artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: e2e-vitest-scenarios-runtime-overrides
path: e2e-artifacts/vitest/runtime-overrides/
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.
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
Loading
Loading