Skip to content

chore: skip build and test steps for documentation-only changes#7654

Open
AKnassa wants to merge 1 commit into
microsoft:mainfrom
AKnassa:chore/7339-skip-ci-docs-only
Open

chore: skip build and test steps for documentation-only changes#7654
AKnassa wants to merge 1 commit into
microsoft:mainfrom
AKnassa:chore/7339-skip-ci-docs-only

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 13, 2026

Copy link
Copy Markdown

What this does

Stops documentation-only pull requests from running the entire build and test pipeline.

Why

Fix a typo in a markdown file today and CI still installs a Rust toolchain and wasm-pack, builds every package, downloads Playwright browsers, and runs the full end-to-end and validation suites — and ci-validate-platforms does all of that again across three operating systems.

That is slow for contributors and expensive for the project, and none of it can tell you anything about a markdown file.

What changed

Follows the implementation plan from the issue.

  • ci-validate-pr.yml — a step after checkout works out whether the pull request touches any non-documentation file, and the expensive steps (toolchain install, build, browser install, unit tests, end-to-end tests, final validation) only run when it does. Change-file validation and linting still run every time, unconditionally.
  • ci-validate-platforms.yml — documentation paths are excluded from the push and pull_request triggers. The scheduled and manual runs are untouched, so the full matrix still runs on its own cadence.
  • azure-pipelines-ci.yml — documentation paths excluded from the PR trigger.

The detection fails open: anything it is unsure about is treated as source, so a real code change can never be mistaken for docs and skip its tests. Runs that are not pull requests always run the full pipeline.

One question for maintainers, please read

Are ci-validate-platforms or the Azure PR check configured as required status checks on main?

If they are, a skipped workflow never reports a status, and documentation-only PRs will sit forever on "Expected — waiting for status to be reported" — the exact opposite of the goal. Branch protection settings are not visible in the repository, so this cannot be checked from here.

If they are required, the fix is to keep the workflow running but make its jobs no-op, rather than skipping the workflow. Happy to change it to that shape — just say the word.

How to see it

The detection logic is a small script with its own unit tests (build/test/, 27 tests, wired into lage test:node), covering documentation-only changes, source changes, mixed changes, renames, deletions, and paths with spaces.

Beyond that: open a doc-only PR on a fork and watch the build and test steps report as skipped while lint and change-file validation still run green; then open a mixed docs-and-source PR and watch the full pipeline run.

Fixes #7339

A markdown-only pull request paid for a wasm-pack install, a Playwright browser
install and the full end-to-end suite, on every supported platform.

Pull requests that touch no source file now skip those steps. Change-file and
lint validation still run unconditionally, and anything other than a pull request
runs the full pipeline.

Fixes microsoft#7339
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@AKnassa AKnassa marked this pull request as ready for review July 14, 2026 02:28
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

skip CI builds for documentation-only changes

1 participant