Skip to content

Path-filter CI: only run the test suites that changed - #6

Merged
saqibmanan merged 7 commits into
mainfrom
feat/ci-path-filtering
Aug 15, 2026
Merged

Path-filter CI: only run the test suites that changed#6
saqibmanan merged 7 commits into
mainfrom
feat/ci-path-filtering

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

Summary

  • Adds a changes job (dorny/paths-filter) that detects which test category changed (api/accessibility/visual/performance/load/e2e); each suite job now skips when its category didn't change, so a docs-only PR runs lint only instead of the full ~25min chain.
  • Adds performance-tests and load-tests as new PR-gated jobs — neither ran on PRs before (performance was nightly-only, load ran nowhere). security/data were deliberately not given their own jobs (security is fully covered by api-tests' existing marker; tests/data/test_data.py has zero actual tests) — see docs/ci_workflow_notes.md for the reasoning.
  • workflow_dispatch gained a run_all checkbox to bypass filtering for a manual full run.
  • Fails open, not closed: if the filter job itself breaks, every suite runs anyway rather than silently passing with zero tests executed.
  • Preserves the existing serial chain (suites that actually run still don't execute concurrently against the shared dev backend — see docs/ci_workflow_notes.md for the 2026-08-12 incident this protects against).

Test plan

  • actionlint clean (verified locally — only two pre-existing findings, both unrelated to this change)
  • Push a commit touching only README.md → confirm only lint/changes run
  • Push a commit touching only tests/api/** → confirm api-tests runs, others show skipped
  • Push a commit that breaks ruff alongside an unrelated tests/api/** change → confirm every downstream job shows skipped, not run
  • workflow_dispatch with run_all: true → confirm every suite runs regardless of paths

Adds a `changes` job (dorny/paths-filter) that outputs a boolean per
test category (api/accessibility/visual/performance/load/e2e), plus a
workflow_dispatch run_all override to bypass it for a manual full run.
Not yet consumed by any suite job.
First real consumer of the changes job: api-tests now skips when
nothing under tests/api/ or its dependencies changed, with a
fail-open guard against changes-job failure and an explicit lint
success check (a skipped predecessor is otherwise ambiguous between
"filtered out" and "lint failed upstream").
Extends the api-tests pattern down the existing chain. Reintroduces
an explicit if: on these two jobs (they had none since 2026-08-12)
using the proven-safe always()+!cancelled() pairing, not the bare
always() that was removed back then.
Neither ran on PRs before (performance was nightly-only; load ran
nowhere). Inserted into the existing serial chain after visual-tests,
with load-tests last-active since it's the suite most likely to
stress the shared dev backend (concurrent-mutation/degradation
tests per its own pytest.ini marker description).

security and data were deliberately not given their own jobs:
tests/api/test_security.py already carries pytest.mark.api (so
api-tests' -m api already runs it), and tests/data/test_data.py has
zero test functions (shared constants only).
Extends needs: to include lint/load-tests/changes and adds the real
gated if: condition as a ready-to-uncomment comment for whenever e2e
is resumed. The active if: false pause (since 2026-08-11) is
untouched.
test-summary now waits on both new jobs and reports their real test
counts (via scripts/suite_summary.py, unchanged — it already handles
a missing report gracefully) plus their raw job status in the
collapsed details table.
Explains the changes job, the fail-open contract, the skip/failure-
ambiguity gotcha that motivates checking lint's result directly in
every gated job, and why always()+!cancelled() reappearing on
accessibility-tests/visual-tests isn't a regression of the
2026-08-12 bare-always() bug.
@saqibmanan
saqibmanan force-pushed the feat/ci-path-filtering branch from a92fcb9 to ad285f0 Compare August 14, 2026 17:41
@saqibmanan
saqibmanan merged commit 757382e into main Aug 15, 2026
14 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant