ci(e2e): add Vitest job selector#5243
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a free-standing ChangesE2E Vitest Workflow Jobs Selector System
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 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
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/e2e-vitest-scenarios.yaml (1)
66-69: 💤 Low valueConsider gating
generate-matrixwhen jobs selector is used.The
generate-matrixjob always runs even wheninputs.jobsis set andlive-scenariosis skipped (line 115). Since the PR reporting script doesn't use the matrix output, you could save CI time by conditionally skipping matrix generation when the jobs selector is used.⚡ Proposed optimization
generate-matrix: runs-on: ubuntu-latest + if: ${{ inputs.jobs == '' }} outputs:Also applies to: 115-115
🤖 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 @.github/workflows/e2e-vitest-scenarios.yaml around lines 66 - 69, The generate-matrix job currently always runs; change it to only run when the user has not provided the jobs selector by adding an if-condition to the generate-matrix job (refer to the generate-matrix job name) so it executes only when github.event.inputs.jobs is empty (and/or when live-scenarios is not being skipped if you prefer a combined check with the live-scenarios job output); this prevents matrix generation when inputs.jobs is set and saves CI time since the PR reporting script doesn't consume the matrix output.
🤖 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 @.github/workflows/e2e-vitest-scenarios.yaml:
- Around line 66-69: The generate-matrix job currently always runs; change it to
only run when the user has not provided the jobs selector by adding an
if-condition to the generate-matrix job (refer to the generate-matrix job name)
so it executes only when github.event.inputs.jobs is empty (and/or when
live-scenarios is not being skipped if you prefer a combined check with the
live-scenarios job output); this prevents matrix generation when inputs.jobs is
set and saves CI time since the PR reporting script doesn't consume the matrix
output.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: e32af384-41b4-4403-9b8a-c667168d9b70
📒 Files selected for processing (3)
.github/workflows/e2e-vitest-scenarios.yamltest/e2e-scenario/support-tests/e2e-scenarios-workflow.test.tstools/e2e-scenarios/workflow-boundary.mts
PR Review AdvisorFindings: 0 needs attention, 4 worth checking, 0 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. |
Summary
Add shared workflow plumbing for selecting free-standing live Vitest jobs in
.github/workflows/e2e-vitest-scenarios.yaml.Related Issues
Refs #5098
Context
The #5098 migration PRs are independently adding one-off
jobsinputs, free-standing job gates, and workflow-boundary validation. This PR lands the common selector baseline first so migration PRs can rebase and only add their own test-specific job block.Changes
workflow_dispatch.inputs.jobsas a comma-separated selector for free-standing live Vitest jobs.validate-jobsjob that rejects malformed selectors, unknown job ids, and mixedscenarios+jobsrequests.jobsis supplied.Rebase guidance for #5098 migration PRs
After this lands, migration PRs should:
allowed_jobs;needs: validate-jobsand the shared selector condition;report-to-pr.needs;Verification
npm ci --ignore-scriptsnpx vitest run --project e2e-vitest-support test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts --silent=false --reporter=defaultnpm run build:clinpm run typecheck:cli -- --pretty falsenpx biome check .github/workflows/e2e-vitest-scenarios.yaml tools/e2e-scenarios/workflow-boundary.mts test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.tsgit diff --checkNote: local commit hook
Test (CLI)ran via pre-commit and failed on unrelated existing local/environment-sensitive CLI tests after the focused validation above passed; commit used--no-verifyafter recording focused green checks.Summary by CodeRabbit
New Features
Improvements
Tests