ci: skip PR test suites for docs-only changes#2326
Closed
aryanku-dev wants to merge 1 commit into
Closed
Conversation
Add a shared reusable detector (.github/workflows/_changes.yml) that resolves a single `code` output: 'false' when a pull request changes only documentation (*.md, *.txt, README*, LICENSE, docs/**) and 'true' otherwise. The PR-triggered workflows (lint, typecheck, test, windows, executable-check, semgrep) gate their jobs on it, so docs-only PRs skip the suites. A skipped required job is treated as passing by branch protection, so docs-only PRs still satisfy required checks and can merge with no tests run. The gate is fail-safe: only a clean docs-only pull_request yields 'false'; every other event (push to master, workflow_dispatch, schedule), an empty/failed diff, or any non-docs path (incl. workflows, lockfiles, Dockerfiles) runs the full suite. The existing release-PR skip is preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closed — out of scope. Decision is to apply the docs-only CI skip to the Buildkite repos only, not the GitHub Actions CLI/SDK repos. Tracking: PER-9796.
What (original)
Skip the full CI suite on pull requests that change only documentation, so a README/
.md/.txt/docs/PR doesn't spend ~an hour of Linux + Windows + macOS runners.Approach: a reusable detector (
.github/workflows/_changes.yml) plus job-level gates on every PR-triggered workflow. Superseded by the Buildkite-only decision; left here for reference.