Skip to content

ci: add path filters to test workflows and docs build check#575

Merged
burmecia merged 4 commits intosupabase:mainfrom
codybrom:ci/path-filters
Feb 19, 2026
Merged

ci: add path filters to test workflows and docs build check#575
burmecia merged 4 commits intosupabase:mainfrom
codybrom:ci/path-filters

Conversation

@codybrom
Copy link
Contributor

@codybrom codybrom commented Feb 17, 2026

Closes #574

Summary

All CI workflows currently trigger on every PR push with no path filtering. This means a wasm-only PR like #573 burns ~8 hours of unnecessary native test and coverage runs across multiple pushes.

This PR adds path-based filtering so each workflow only runs when relevant code changes:

  • test_wrappers.yml uses a lightweight detection job to gate test_native and test_wasm independently (since they need different path triggers but live in the same workflow file)
  • test_supabase_wrappers.yml and coverage.yml use native paths filters on the workflow trigger
  • test_docs.yml is a new workflow that runs mkdocs build when docs change

Each filter also includes its own workflow file so CI config changes still trigger the relevant tests.

Adds path-based filtering so CI only runs relevant jobs per PR:
- test_wrappers: detection job gates native vs wasm jobs independently
- test_supabase_wrappers: native paths filter on trigger
- coverage: native paths filter on trigger
- test_docs: new workflow to build MkDocs on docs changes

Closes supabase#574
Copilot AI review requested due to automatic review settings February 17, 2026 15:33
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Improved CI with path-based trigger filters to reduce unnecessary runs.
    • Updated Rust toolchain setup to a newer action and removed deprecated options for more reliable builds.
    • Reorganized test workflows to detect changed areas and conditionally run native and WebAssembly tests only when relevant.
  • New Features

    • Added an automated documentation build check to validate site builds in CI.

Walkthrough

Updated CI workflows: added path filters in coverage.yml and test_supabase_wrappers.yml to limit triggers to relevant directories; added a new changes job in test_wrappers.yml that detects modified paths and gates test_native and test_wasm jobs based on outputs; introduced a new test_docs.yml workflow to build MkDocs on docs changes; replaced actions-rs/toolchain@v1 with actions-rust-lang/setup-rust-toolchain@v1 and removed deprecated options in the Rust toolchain steps.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant PR as Pull Request
participant GH as GitHub Actions
participant Changes as changes job
participant Native as test_native job
participant Wasm as test_wasm job
PR->>GH: push / open PR
GH->>Changes: run changes job (detect modified paths)
Changes-->>GH: outputs (native=true/false, wasm=true/false)
GH->>Native: run if needs.changes.outputs.native == 'true'
GH->>Wasm: run if needs.changes.outputs.wasm == 'true'
Native->>GH: checkout → setup toolchain → build → test
Wasm->>GH: checkout → setup toolchain → build → test

Assessment against linked issues

Objective Addressed Explanation
Add path filters to coverage.yml to trigger only on relevant code changes [#574]
Add path filters to test_supabase_wrappers.yml to trigger only on supabase-wrappers and supabase-wrappers-macros changes [#574]
Add path filters / conditional gating to test_wrappers.yml so native and wasm tests run only when relevant paths change [#574]

Out-of-scope changes

Code Change Explanation
Add MkDocs validation workflow (.github/workflows/test_docs.yml) New docs build workflow was not requested by the linked issue; it goes beyond path-filtering objectives.
Replace Rust toolchain action with actions-rust-lang/setup-rust-toolchain@v1 (.github/workflows/coverage.yml, .github/workflows/test_supabase_wrappers.yml, .github/workflows/test_wrappers.yml) CI maintenance change (toolchain action replacement and option removal) is unrelated to the path-filtering objective.

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

Copy link

@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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/coverage.yml (1)

31-36: ⚠️ Potential issue | 🟠 Major

Replace actions-rs/toolchain@v1 with maintained GitHub Action to prevent CI breakage.

The actions-rs/toolchain action is archived and uses Node 12, which was removed from GitHub Actions runners in August 2023. With Node 24 becoming the default runner starting March 4, 2026, this action will break. Use dtolnay/rust-toolchain instead—a maintained alternative that supports the same parameters.

🔧 Suggested update
-      - name: Install Rust toolchain
-        uses: actions-rs/toolchain@v1
-        with:
-          toolchain: 1.88.0
-          components: llvm-tools-preview, rustfmt, clippy
-          default: true
-          override: true
+      - name: Install Rust toolchain
+        uses: dtolnay/rust-toolchain@stable
+        with:
+          toolchain: 1.88.0
+          components: llvm-tools-preview, rustfmt, clippy
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/coverage.yml around lines 31 - 36, Replace the archived
GitHub Action usage actions-rs/toolchain@v1 with the maintained
dtolnay/rust-toolchain action; update the workflow step that currently uses
actions-rs/toolchain@v1 to dtolnay/rust-toolchain and pass equivalent inputs
(toolchain -> toolchain, components -> components, default/override semantics
via dtolnay action flags) so the toolchain pin (1.88.0) and requested components
(llvm-tools-preview, rustfmt, clippy) are preserved and the action remains
compatible with modern runners.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/test_supabase_wrappers.yml:
- Around line 28-33: Replace the deprecated actions-rs/toolchain@v1 step with a
maintained setup action by updating the workflow step that currently uses
"actions-rs/toolchain@v1" to use "actions-rust-lang/setup-rust-toolchain@v1" and
pass the same inputs (toolchain: 1.88.0 and components: rustfmt, clippy);
alternatively, replace the step with explicit rustup commands to install and set
the 1.88.0 toolchain and add components if you prefer that approach—update the
step referenced by the existing "uses: actions-rs/toolchain@v1" line
accordingly.

In @.github/workflows/test_wrappers.yml:
- Around line 26-29: The change-detection uses git diff --name-only HEAD~1 which
misses multi-commit pushes and the wasm grep omits supabase-wrappers; update the
CHANGED assignment to compute the full event range (e.g., use the GitHub push
range like git diff --name-only "${{ github.event.before }}..${{ github.sha }}"
or an equivalent full-range diff) and modify the wasm grep pattern used to
produce the "wasm" output to include supabase-wrappers/ alongside the existing
wasm-wrappers/ and wrappers/src/fdw/wasm_fdw/ paths so both multi-commit pushes
are detected and supabase-wrappers triggers wasm tests.
- Around line 48-54: Replace the unmaintained action usage "uses:
actions-rs/toolchain@v1" with the maintained dtolnay action and keep Rust pinned
to 1.88.0: change the action ref to "uses: dtolnay/rust-toolchain@1.88.0" (or
"dtolnay/rust-toolchain@master" plus an explicit toolchain input), remove the
now-unneeded "default" and "override" inputs, and ensure the "toolchain: 1.88.0"
and "components: rustfmt, clippy" inputs are present so the workflow remains
pinned and installs the required components; apply this change for each
occurrence of uses: actions-rs/toolchain@v1 in the file.

---

Outside diff comments:
In @.github/workflows/coverage.yml:
- Around line 31-36: Replace the archived GitHub Action usage
actions-rs/toolchain@v1 with the maintained dtolnay/rust-toolchain action;
update the workflow step that currently uses actions-rs/toolchain@v1 to
dtolnay/rust-toolchain and pass equivalent inputs (toolchain -> toolchain,
components -> components, default/override semantics via dtolnay action flags)
so the toolchain pin (1.88.0) and requested components (llvm-tools-preview,
rustfmt, clippy) are preserved and the action remains compatible with modern
runners.

- Replace deprecated actions-rs/toolchain@v1 with
  actions-rust-lang/setup-rust-toolchain@v1 (pre-existing issue)
- Fix change detection to use full commit range instead of HEAD~1
- Add supabase-wrappers/ to wasm filter (host depends on it)
Copy link

@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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/test_wrappers.yml:
- Around line 25-36: The workflow can fail when BASE is the null SHA; update the
filter step in .github/workflows/test_wrappers.yml to detect the null SHA string
"0000000000000000000000000000000000000000" and handle it before running git
diff: after computing BASE and HEAD, if BASE equals the null SHA then attempt to
set BASE to the previous commit with git rev-parse "$HEAD^" (falling back to
using a full tree listing for HEAD if rev-parse fails), and then compute CHANGED
using either git diff --name-only "$BASE" "$HEAD" when BASE differs from HEAD or
git ls-tree -r --name-only "$HEAD" when there is no prior commit; keep the same
output writes for native and wasm using the CHANGED variable.

@codybrom codybrom changed the title ci: add path filters to test workflows ci: add path filters to test workflows and docs build check Feb 17, 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


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

Copy link
Member

@burmecia burmecia left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR! 👍

@burmecia burmecia merged commit 57e2c42 into supabase:main Feb 19, 2026
13 of 14 checks passed
@burmecia burmecia added the ci label Feb 19, 2026
@codybrom codybrom deleted the ci/path-filters branch February 19, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: add path filters to skip unrelated test jobs

3 participants