Skip to content

build: run all test jobs on workflow_dispatch#3226

Open
lklimek wants to merge 4 commits intov3.1-devfrom
fix/ci-workflow-dispatch-runs-all-jobs
Open

build: run all test jobs on workflow_dispatch#3226
lklimek wants to merge 4 commits intov3.1-devfrom
fix/ci-workflow-dispatch-runs-all-jobs

Conversation

@lklimek
Copy link
Contributor

@lklimek lklimek commented Mar 11, 2026

Issue being fixed or feature implemented

Regression from #3192 (ci: skip matrix jobs when no packages changed) — workflow_dispatch triggers skip Rust packages, JS packages, and build-js jobs because dorny/paths-filter detects zero file changes when there is no PR diff.

What was done?

  • Skip dorny/paths-filter steps on workflow_dispatch (they produce empty results without a PR diff)
  • Added an override step that outputs the full list of all RS and JS packages when manually triggered
  • Added || github.event_name == 'workflow_dispatch' fallback to affected job conditions:
    • build-js
    • rs-packages
    • js-packages
    • dashmate-e2e-tests

Jobs that already handled workflow_dispatch correctly (build-images, test-suite, test-functional) were left unchanged.

How Has This Been Tested?

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

🤖 Co-authored by Claudius the Magnificent AI Agent

Summary by CodeRabbit

  • Chores
    • Improved CI workflow for manual (dispatch) runs: more reliable output population and conditional guards to avoid redundant checks.
    • Preserved existing build/test behavior while adding safer handling of outputs during manual activations.

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>
@github-actions github-actions bot added this to the v3.1.0 milestone Mar 11, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

Adds a workflow_dispatch-specific override step to .github/workflows/tests.yml that reads YAML filter files and populates outputs. Filter-step execution is skipped on workflow_dispatch; job outputs prefer override outputs when present, otherwise fall back to existing filter-step outputs.

Changes

Cohort / File(s) Summary
Workflow Output Fallback & Override Mechanism
​.github/workflows/tests.yml
Adds Override all outputs for workflow_dispatch step to read YAML filter files and emit outputs (js-packages, js-packages-direct, rs-packages, rs-packages-direct, run). Adds if guards to skip filter steps on workflow_dispatch. Job outputs now use override outputs when available, otherwise fall back to existing filter-step outputs.

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)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I nibble at YAML, whiskers all a-twitch,
I write outputs swift from a dispatchy glitch,
Filters take a nap while my override sings,
Jobs read my carrots and hop on new things. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'build: run all test jobs on workflow_dispatch' directly reflects the main objective of fixing a regression where CI matrix jobs were skipped on workflow_dispatch triggers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ci-workflow-dispatch-runs-all-jobs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.60%. Comparing base (06cef2c) to head (388b514).
⚠️ Report is 6 commits behind head on v3.1-dev.

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     
Components Coverage Δ
dpp 34.35% <90.70%> (∅)
drive 42.50% <50.98%> (∅)
drive-abci 79.24% <ø> (∅)
sdk 32.13% <ø> (ø)
dapi-client 20.87% <ø> (ø)
platform-version ∅ <ø> (∅)
platform-value ∅ <ø> (∅)
platform-wallet ∅ <ø> (∅)
drive-proof-verifier ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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>
@lklimek lklimek changed the title fix(ci): run all test jobs on workflow_dispatch build: run all test jobs on workflow_dispatch Mar 11, 2026
@lklimek lklimek marked this pull request as ready for review March 11, 2026 13:15
@lklimek lklimek had a problem deploying to test-suite-approval March 11, 2026 13:16 — with GitHub Actions Error
@lklimek lklimek had a problem deploying to test-suite-approval March 11, 2026 13:16 — with GitHub Actions Error
@lklimek lklimek requested a review from Copilot March 11, 2026 13:17
@lklimek lklimek self-assigned this Mar 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-filter steps when the workflow is triggered via workflow_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-filter outputs for PR/scheduled runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)

83-93: Simplify the yq command for clarity

The dynamic approach to extracting package lists ensures consistency. However, the [keys | .[]] syntax is redundant—keys produces 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 keys directly 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

📥 Commits

Reviewing files that changed from the base of the PR and between b3bd9ed and df8cc75.

📒 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>
@lklimek lklimek had a problem deploying to test-suite-approval March 11, 2026 14:47 — with GitHub Actions Failure
@lklimek lklimek had a problem deploying to test-suite-approval March 11, 2026 14:47 — with GitHub Actions Failure
@lklimek lklimek added the ready for final review Ready for the final review. If AI was involved in producing this PR, it has already had a reviewer. label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for final review Ready for the final review. If AI was involved in producing this PR, it has already had a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants