Skip to content

Run CI once per pull request, skip tests for docs-only changes - #75

Merged
icaliman merged 1 commit into
mainfrom
ci/skip-tests-on-docs
Nov 25, 2026
Merged

icaliman merged 1 commit into
mainfrom
ci/skip-tests-on-docs

Conversation

@icaliman

Copy link
Copy Markdown
Member

Why

Every commit on a pull request ran the whole suite twice, once for push and once for pull_request, and a change to docs, Markdown or the release workflows ran it like a code change. Same change as packstub/session-replay#80.

What changes

  • push runs only on main (after a merge); a pull request runs once. A tag push no longer runs the tests either.
  • A new What changed job lists what the change touches. When only docs, Markdown, art/ or the plumbing that no test covers (the release, docs-sync, add-to-project, Dependabot auto-merge, code style and package health workflows, .github/release.yml, dependabot.yml, FUNDING.yml, the issue templates) changed, every test job skips.
  • A pull request is compared as its merge commit against main as it is now; a push to main with the commit main pointed at before. A rename counts under its old path too.
  • Tests passed still reports, so the required check never waits: it passes when every job succeeded, or when the test jobs skipped because only docs changed, and fails on anything else.
  • Anything not on the list, tests.yml included, runs everything, as does a push with no base to compare with.
  • A newer commit still cancels a pull request's run in progress; a push to main is no longer cancelled by the next one.

Tests

@icaliman
icaliman merged commit 1c9c0c0 into main Nov 25, 2026
10 checks passed
@icaliman
icaliman deleted the ci/skip-tests-on-docs branch November 25, 2026 08:55
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