Skip to content

ci: skip app builds for documentation and press-kit-only pull requests - #132

Merged
raiseCatError merged 1 commit into
devfrom
ci/skip-heavy-jobs-for-docs-media
Nov 3, 2026
Merged

raiseCatError merged 1 commit into
devfrom
ci/skip-heavy-jobs-for-docs-media

Conversation

@raiseCatError

Copy link
Copy Markdown
Owner

Press-kit PR #127 rebuilt three apps and booted an iPhone Duo simulator. The Tests classifier only recognised top-level and docs/ Markdown. This PR extends the existing classifier rather than adding a parallel system.

What changes

  • The rules move from inline Python in tests.yml to scripts/ci/classify_pr_paths.py, with 23 unit tests in scripts/ci/test_classify_pr_paths.py. The tests run in release-tooling.
  • The changes job runs the base branch's copy of the classifier (git show HEAD^1:…), so a PR can't reclassify itself by editing it. When the base has no classifier, as on this PR, the job falls back to full CI.
  • git diff --no-renames lists both sides of a rename, so a Swift file can't be "renamed" into a Markdown file to skip CI.
  • New non-code paths:
    • press-kit/**, tools/press-kit/** and assets/press-kit-preview.png
    • assets/readme/* images, which no build references
    • Markdown in docs/, handoff-2.0/, launch/ and ux-review/, plus Markdown directly in fastlane/ and AndroidReceiver/
    • top-level Markdown, as before
    • .gitignore, only when every added or removed line is blank, a comment, or a press.html/press-kit…/docs… entry
  • The upstream listing-ID guard, which AppStoreTests enforces, now scans every changed file. A match still forces the Mac job.
  • New non-required press-kit job (Ubuntu, about a minute). build.py verifies every asset against the reviewed SHA-256 inventory and rebuilds the page, previews and ZIPs, and README/preview images must decode. It runs for press-kit PRs, on every push, and whenever classification fails.

Jobs per PR type

PR changes changes release-tooling mac android ios-duo press-kit conventional
Docs / README images only runs skipped (passes) skipped (passes) skipped (passes) skipped skipped runs
Press kit (± docs, safe .gitignore) runs skipped (passes) skipped (passes) skipped (passes) skipped runs runs
pr-title.yml only runs runs skipped skipped skipped skipped runs
Any app code, shared protocol, project/dependency config, scripts, workflows (incl. tests.yml and the classifier), unknown path, or mixed runs runs runs runs runs runs if press-kit touched runs
Push to main/dev/release/** runs runs runs runs runs runs n/a

Required check names (mac, android, release-tooling, conventional) are unchanged. A skipped job reports success, so docs-only PRs aren't left pending. Fail closed: if changes fails, every job runs.

Verified locally

  • 23 classifier unit tests pass.
  • check-release-workflows.rb passes.
  • An end-to-end simulation of the classify step from tests.yml in a scratch git repo (base commit plus --no-ff merge) gave the expected result for 8 cases: docs-only, press-kit, mixed, code renamed to .md, a tests.yml change, an unsafe .gitignore change, a PR that rewrites the classifier to skip everything (full CI), and a push.
  • The image-decode step passes against the press-kit tree (11 images).

This PR changes tests.yml and has no base classifier, so it runs full CI itself.

The Tests classifier only recognised top-level and docs/ Markdown, so
press-kit PRs rebuilt three apps and booted an iPhone Duo simulator.
Move the rules into scripts/ci/classify_pr_paths.py with unit tests, run
the base branch's copy so a PR can't reclassify itself, and extend them
to press-kit media and tooling, the press-kit preview, README images,
nested documentation Markdown and .gitignore changes limited to
press-kit/documentation entries. Renames are listed on both sides.

Skipped jobs keep their required check names. A new press-kit job
verifies the reviewed asset hashes, rebuilds the kit and decodes the
README and preview images. Pushes and every other PR still run full CI.
@raiseCatError
raiseCatError merged commit f7da556 into dev Nov 3, 2026
12 of 13 checks passed
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