Skip to content

chore(ci): gate behavior and superdoc tests on changed paths - #3031

Merged
caio-pizzol merged 4 commits into
mainfrom
caio-pizzol/ci-path-gating-phase-1
Apr 30, 2026
Merged

chore(ci): gate behavior and superdoc tests on changed paths#3031
caio-pizzol merged 4 commits into
mainfrom
caio-pizzol/ci-path-gating-phase-1

Conversation

@caio-pizzol

Copy link
Copy Markdown
Contributor

Today behavior tests run on every PR regardless of paths, and ci-superdoc.yml uses workflow-level paths-ignore, which can leave its required check pending forever on docs-only PRs. This adds a detect job (dorny/paths-filter, SHA-pinned) per workflow that flags whether the PR touches paths relevant to each suite, gates downstream jobs on the result, and keeps the required validate sentinels reporting in every case.

  • merge_group and workflow_dispatch always run the full suite
  • Sentinel passes when detect says skip; fails on detect-job failure, accidental dependency skips, or any failed/cancelled downstream job
  • Browser matrix unchanged for now (chromium-only on PR, 3-browser on merge_group)

Add a detect job (dorny/paths-filter, SHA-pinned) to ci-behavior.yml
and ci-superdoc.yml that flags whether the PR touches paths relevant
to each suite. Downstream jobs gate on the detect output; merge_group
and workflow_dispatch always run the full suite.

The validate sentinel passes when detect says "skip" so the required
check still reports green, but treats any other skipped/failed/cancelled
downstream job as a failure (catches accidental matrix or dependency
skips, not just job failures).

Removes ci-superdoc.yml's workflow-level paths-ignore, which could
leave its required check pending forever on docs/sibling-package-only
PRs.
- Add pull-requests: read to detect job so dorny/paths-filter can list
  changed files via the GitHub API on PR events (workflow-level token
  was scoped to contents: read only).
- Behavior filter: add tsconfig.base.json, tsconfig.references.json,
  vite.sourceResolve.ts (build inputs).
- SuperDoc filter: add apps/cli/** (cli-tests), packages/collaboration-yjs/**
  (coverage build), packages/docx-evidence-contracts/** (root typecheck
  references), plus tsconfig.base.json, tsconfig.references.json,
  vite.sourceResolve.ts, vitest.baseConfig.ts, eslint.config.mjs.
- Validate sentinels now fail fast when detect itself failed or was
  cancelled, instead of treating empty outputs as 'no relevant paths'.
@caio-pizzol
caio-pizzol requested a review from a team as a code owner April 30, 2026 21:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e752a50794

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/ci-superdoc.yml
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

caio-pizzol and others added 2 commits April 30, 2026 18:34
- Behavior matrix now runs chromium + firefox + webkit whenever the
  detect gate says the suite is relevant. merge_queue is not enabled,
  so the merge_group fallback never fires today; if the suite runs at
  all, it should give us cross-browser coverage at PR time.
- Behavior filter: widen packages/document-api/src/** to
  packages/document-api/** so package.json/exports changes also
  trigger (the harness imports the package, not just src).
- SuperDoc filter: add patches/**, .prettierrc, .prettierignore.
  Patches are wired through patchedDependencies in both package.json
  and pnpm-workspace.yaml, so a bad patch breaks pnpm install. The
  prettier configs are read by `pnpm run format --check`.
@caio-pizzol
caio-pizzol merged commit 876e3ab into main Apr 30, 2026
29 checks passed
@caio-pizzol
caio-pizzol deleted the caio-pizzol/ci-path-gating-phase-1 branch April 30, 2026 22:02
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.

2 participants