ci(e2e): add Vitest scenario workflow#4968
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
📝 WalkthroughWalkthroughThis PR introduces a new opt-in GitHub Actions workflow for running Vitest E2E scenarios on manual dispatch, complete with validation infrastructure, test coverage, and documentation. The workflow runs filtered Vitest tests, summarizes artifacts, and uploads results. ChangesVitest E2E Workflow and Validation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 0 worth checking, 1 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tools/e2e-scenarios/workflow-boundary.mts (1)
84-96: 💤 Low valueConsider adding bracket notation detection for dispatch input interpolation.
The regex pattern
/\$\{\{\s*(inputs|github\.event\.inputs)\./catches common dot-notation interpolation like${{ inputs.test_filter }}, but would miss bracket notation like${{ inputs['test_filter'] }}. While bracket notation is less common in GitHub Actions workflows, adding support would make the validation more comprehensive.🔍 Enhanced pattern to also catch bracket notation
function requireNoDispatchInputInterpolation( errors: string[], steps: readonly WorkflowStep[], ): void { - const expressionPattern = /\$\{\{\s*(inputs|github\.event\.inputs)\./; + const expressionPattern = /\$\{\{\s*(inputs(\[|\.)|github\.event\.inputs(\[|\.))/; for (const step of steps) { if (expressionPattern.test(stringValue(step.run))) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/e2e-scenarios/workflow-boundary.mts` around lines 84 - 96, The current regex in requireNoDispatchInputInterpolation (expressionPattern) only matches dot-notation like `${{ inputs.foo }}`; update expressionPattern to also detect bracket-notation such as `${{ inputs['foo'] }}` or `${{ github.event.inputs["foo"] }}` by extending the pattern to allow either `.\w+` or `['"...']` access after the `inputs` or `github.event.inputs` token (e.g. add a non-capturing group like `(?:\.\w+|\[['"]\w+['"]\])` to the existing pattern) so stringValue(step.run) will be flagged for both styles.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tools/e2e-scenarios/workflow-boundary.mts`:
- Around line 84-96: The current regex in requireNoDispatchInputInterpolation
(expressionPattern) only matches dot-notation like `${{ inputs.foo }}`; update
expressionPattern to also detect bracket-notation such as `${{ inputs['foo'] }}`
or `${{ github.event.inputs["foo"] }}` by extending the pattern to allow either
`.\w+` or `['"...']` access after the `inputs` or `github.event.inputs` token
(e.g. add a non-capturing group like `(?:\.\w+|\[['"]\w+['"]\])` to the existing
pattern) so stringValue(step.run) will be flagged for both styles.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d5b4445a-563d-40fc-8c51-a20d33eccd1b
📒 Files selected for processing (4)
.github/workflows/e2e-vitest-scenarios.yamltest/e2e-scenario/docs/README.mdtest/e2e-scenario/framework-tests/e2e-scenarios-workflow.test.tstools/e2e-scenarios/workflow-boundary.mts
|
E2E advisor requested |
Summary
Adds a manual GitHub Actions entry point for running the opt-in Vitest live scenario project and collecting fixture artifacts. This is stack PR 6/7 for #4941. cc @jyaunches for review.
Related Issue
Refs #4941.
Changes
.github/workflows/e2e-vitest-scenarios.yamlfor manually dispatched live scenario runs.NEMOCLAW_RUN_E2E_SCENARIOS=1in the workflow and supports an optional test filter..e2e/vitest/artifacts with hidden-file collection enabled.Type of Change
Verification
npx vitest run --project e2e-scenario-framework test/e2e-scenario/framework-tests/e2e-scenarios-workflow.test.ts --silent=false --reporter=defaultnpx vitest run --project e2e-scenario-framework --silent=false --reporter=defaultnpm run typecheck:clinpx prek run --files .github/workflows/e2e-vitest-scenarios.yaml test/e2e-scenario/docs/README.md test/e2e-scenario/framework-tests/e2e-scenarios-workflow.test.ts tools/e2e-scenarios/workflow-boundary.mtsnpx vitest run --project cli test/cli/list-inference.test.ts --silent=false --reporter=defaultafter the first pre-push attempt hit a transient timeout in that unrelated testgit push origin codex/e2e-4941-stack-06-workflowpre-push hooks passed on retrygh workflow run e2e-vitest-scenarios.yaml --ref codex/e2e-4941-stack-06-workflow --field test_filter=test/e2e-scenario/live/ubuntu-repo-cli-smoke.test.tswas attempted; GitHub returnedHTTP 404because new workflow_dispatch workflows cannot be invoked until the workflow exists on the default branchnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com