Skip to content

Skip build and test jobs for Markdown-only pushes to a passing PR - #2942

Merged
bitsandfoxes merged 3 commits into
mainfrom
ci/skip-docs-only-pushes
Nov 12, 2026
Merged

bitsandfoxes merged 3 commits into
mainfrom
ci/skip-docs-only-pushes

Conversation

@bitsandfoxes

@bitsandfoxes bitsandfoxes commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

A push to a PR that only changes Markdown files still runs the full CI: paths-ignore is matched against the whole PR diff, so a CHANGELOG fix-up on a code PR rebuilds and tests everything.

A new changes job in ci.yml decides whether to run the build and test jobs. It skips them when the push is to an open PR, CI passed on the previous head, the new head is strictly ahead of it (no force-push that dropped commits), and every file changed since is a .md file outside package*/. Markdown under package/ and package-dev/ ships in the UPM package, so it still runs the package validation. A failed GitHub API call falls back to running everything.

The gate sits on sdk, build-unity-sdk, package-validation and test-create; all other build and test jobs depend on these and skip with them. A skipped run says why in its job summary. Push and workflow_dispatch runs are unaffected.

#skip-changelog

🤖 Generated with Claude Code

@bitsandfoxes
bitsandfoxes marked this pull request as ready for review November 11, 2026 13:41
@jpnurmi

jpnurmi commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Ooh, nice! Could it be a globs-configurable composite action in github-workflows?

@JoshuaMoelans JoshuaMoelans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice, I tried doing something in getsentry/sentry-native#1235 but back then I couldn't get it to work. maybe like J-P says, makes sense to integrate this org-wide 👀

@bitsandfoxes
bitsandfoxes merged commit 58a1aa9 into main Nov 12, 2026
186 of 198 checks passed
@bitsandfoxes
bitsandfoxes deleted the ci/skip-docs-only-pushes branch November 12, 2026 13:22
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.

3 participants