Skip to content

CI: add path filters to skip unrelated test jobs #574

@codybrom

Description

@codybrom

Problem

All three CI workflows trigger on every pull request push with no path filtering. Each push kicks off 4 jobs:

Workflow file Job What it tests
test_wrappers.yml Run native wrappers tests All native FDWs (~40 min)
test_wrappers.yml Run Wasm wrappers tests All wasm FDWs (~14 min)
test_supabase_wrappers.yml Run supabase_wrappers tests Core framework (~4 min)
coverage.yml Code Coverage Native + framework with coverage (~30 min)

This means a change that only touches wasm-wrappers/ or docs/ still runs the full native test suite and coverage, and vice versa.

Actual impact on PR #573

PR #573 only touches files under wasm-wrappers/fdw/openapi_fdw/ and docs/. Zero native code changes. Over 8 pushes:

Job Runs Avg duration Total time
Native wrappers tests 6 ~44 min ~4.4 hrs
Code Coverage (native + framework) 6 ~34 min ~3.4 hrs
supabase_wrappers tests 8 ~4 min ~0.5 hrs
Unnecessary total ~8 hrs

Only the wasm test job needed to run.

It's also worth noting that there is no CI job that builds or validates docs on PRs, so any change to the mkdocs setup under docs/ triggers ~90 minutes of unrelated test jobs while the docs themselves go unchecked.

Suggestion

Add paths filters so that each workflow only triggers when relevant code changes:

  • Native FDW tests (test_native job): wrappers/**, supabase-wrappers/**, supabase-wrappers-macros/**
  • Wasm FDW tests (test_wasm job): wasm-wrappers/**, supabase-wrappers/**
  • Core framework tests: supabase-wrappers/**, supabase-wrappers-macros/**
  • Coverage: same paths as the tests it covers
  • Changes to docs/, example READMEs, or CI config alone skip all test jobs

Workflow-level paths filters are the simplest approach. Alternatively, dorny/paths-filter can conditionally skip individual jobs within a single workflow while still reporting them as passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions