ci: add path filters to test workflows and docs build check#575
ci: add path filters to test workflows and docs build check#575burmecia merged 4 commits intosupabase:mainfrom
Conversation
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
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughSummary by CodeRabbit
WalkthroughUpdated 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 Assessment against linked issues
Out-of-scope changes
Comment |
There was a problem hiding this comment.
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 | 🟠 MajorReplace
actions-rs/toolchain@v1with maintained GitHub Action to prevent CI breakage.The
actions-rs/toolchainaction 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. Usedtolnay/rust-toolchaininstead—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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.ymluses a lightweight detection job to gatetest_nativeandtest_wasmindependently (since they need different path triggers but live in the same workflow file)test_supabase_wrappers.ymlandcoverage.ymluse nativepathsfilters on the workflow triggertest_docs.ymlis a new workflow that runsmkdocs buildwhen docs changeEach filter also includes its own workflow file so CI config changes still trigger the relevant tests.