build: run all test jobs on workflow_dispatch#3226
Conversation
PR #3192 introduced paths-filter gating for matrix jobs but didn't account for workflow_dispatch, which has no PR diff — causing dorny/paths-filter to detect zero changes and skip Rust packages, JS packages, and build-js jobs entirely. Fix by: - Skipping paths-filter steps on workflow_dispatch - Adding an override step that outputs all packages - Adding workflow_dispatch fallback to affected job conditions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a workflow_dispatch-specific override step to Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Workflow as "GitHub Actions\nWorkflow"
participant Override as "Override Step\n(read YAML -> GITHUB_OUTPUT)"
participant Filter as "Filter Steps\n(filter-js / filter-rs / ...)"
participant Job as "Build/Test Jobs"
User->>Workflow: trigger (workflow_dispatch)
Workflow->>Override: run override step (reads YAML files)
Override->>Workflow: set outputs (GITHUB_OUTPUT)
Workflow->>Filter: skip (if workflow_dispatch) / otherwise run
Workflow->>Job: start jobs
Job->>Workflow: read outputs (prefer override -> fallback to filter)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3.1-dev #3226 +/- ##
=============================================
+ Coverage 30.67% 50.60% +19.92%
=============================================
Files 105 3121 +3016
Lines 9356 222187 +212831
=============================================
+ Hits 2870 112433 +109563
- Misses 6486 109754 +103268
🚀 New features to boost your workflow:
|
Replace hardcoded package lists in the workflow_dispatch override with yq-based parsing of the existing package-filter YAML files. Remove redundant workflow_dispatch checks from individual job conditions — the override outputs already satisfy existing guards. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the main CI “Tests” workflow so manual workflow_dispatch runs execute the full Rust/JS test matrices instead of being skipped due to dorny/paths-filter reporting no changes when there is no PR diff.
Changes:
- Skips
dorny/paths-filtersteps when the workflow is triggered viaworkflow_dispatch. - Adds an override step that emits full JS/RS package lists (derived from the existing filter YAML files) for manual runs.
- Wires job outputs to prefer the override outputs, falling back to
paths-filteroutputs for PR/scheduled runs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)
83-93: Simplify the yq command for clarityThe dynamic approach to extracting package lists ensures consistency. However, the
[keys | .[]]syntax is redundant—keysproduces the same JSON array output:Suggested change
- to_json() { yq -o=json '[keys | .[] ]' "$1" | tr -d '\n'; } + to_json() { yq -o=json 'keys' "$1" | tr -d '\n'; }Both forms output a JSON array of the top-level keys. Using
keysdirectly is simpler and more readable.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/tests.yml around lines 83 - 93, The to_json() helper function uses yq with the redundant expression '[keys | .[] ]'; update the yq invocation inside the to_json() function (the shell function named to_json) to call yq -o=json 'keys' "$1" instead, keeping the rest of the output echo lines (js-packages, js-packages-direct, rs-packages, rs-packages-direct) and the GITHUB_OUTPUT usage unchanged so the script produces the same JSON arrays with a simpler, clearer yq expression.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/tests.yml:
- Around line 83-93: The to_json() helper function uses yq with the redundant
expression '[keys | .[] ]'; update the yq invocation inside the to_json()
function (the shell function named to_json) to call yq -o=json 'keys' "$1"
instead, keeping the rest of the output echo lines (js-packages,
js-packages-direct, rs-packages, rs-packages-direct) and the GITHUB_OUTPUT usage
unchanged so the script produces the same JSON arrays with a simpler, clearer yq
expression.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f36cc962-141b-49dc-bbc7-49c6ef23e83c
📒 Files selected for processing (1)
.github/workflows/tests.yml
Prevents silent yq failures from producing empty JSON arrays that would cause downstream fromJson() to skip jobs unexpectedly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Issue being fixed or feature implemented
Regression from #3192 (
ci: skip matrix jobs when no packages changed) —workflow_dispatchtriggers skip Rust packages, JS packages, and build-js jobs becausedorny/paths-filterdetects zero file changes when there is no PR diff.What was done?
dorny/paths-filtersteps onworkflow_dispatch(they produce empty results without a PR diff)|| github.event_name == 'workflow_dispatch'fallback to affected job conditions:build-jsrs-packagesjs-packagesdashmate-e2e-testsJobs that already handled
workflow_dispatchcorrectly (build-images,test-suite,test-functional) were left unchanged.How Has This Been Tested?
workflow_dispatchon the previous commit skipped Rust/JS jobs (observed in run 22952046433)Breaking Changes
None.
Checklist:
🤖 Co-authored by Claudius the Magnificent AI Agent
Summary by CodeRabbit