Repository navigation
ci: skip app builds for documentation and press-kit-only pull requests - #132
Merged
Merged
Conversation
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.
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.
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
tests.ymltoscripts/ci/classify_pr_paths.py, with 23 unit tests inscripts/ci/test_classify_pr_paths.py. The tests run inrelease-tooling.changesjob 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-renameslists both sides of a rename, so a Swift file can't be "renamed" into a Markdown file to skip CI.press-kit/**,tools/press-kit/**andassets/press-kit-preview.pngassets/readme/*images, which no build referencesdocs/,handoff-2.0/,launch/andux-review/, plus Markdown directly infastlane/andAndroidReceiver/.gitignore, only when every added or removed line is blank, a comment, or apress.html/press-kit…/docs…entryAppStoreTestsenforces, now scans every changed file. A match still forces the Mac job.press-kitjob (Ubuntu, about a minute).build.pyverifies 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
.gitignore)pr-title.ymlonlytests.ymland the classifier), unknown path, or mixedRequired check names (
mac,android,release-tooling,conventional) are unchanged. A skipped job reports success, so docs-only PRs aren't left pending. Fail closed: ifchangesfails, every job runs.Verified locally
check-release-workflows.rbpasses.tests.ymlin a scratch git repo (base commit plus--no-ffmerge) gave the expected result for 8 cases: docs-only, press-kit, mixed, code renamed to.md, atests.ymlchange, an unsafe.gitignorechange, a PR that rewrites the classifier to skip everything (full CI), and a push.This PR changes
tests.ymland has no base classifier, so it runs full CI itself.