Repository navigation
ci: build, test and API-break check - #29
Conversation
Nothing compiled the library on a PR, so a change that does not build, or that uses a newer-iOS API inside a component annotated for iOS 14, could be merged. Add: - Build (iOS): iOS Simulator build in Debug (compiles previews) and Release - Test: tests on an available iPhone simulator - API compatibility: diagnose-api-breaking-changes against the base branch; a break passes only when the PR title marks it with "!" - Lint workflows: actionlint 1.7.12 Pin every action by SHA (including the existing semantic PR title action) and let Dependabot keep them current. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- API check: build for the iOS Simulator, where the UIKit-only public API exists (on the macOS host it was compiled out and never compared), and compare against the merge commit's first parent instead of the live base tip, so a re-run after the base moves does not report new base API as removed. Body edits no longer cancel a running check. - Type-check the sources at the iOS floor from Package.swift: xcodebuild raises the deployment target to the SDK minimum and missed iOS 15 APIs. - Test: pick a simulator runtime the selected Xcode can run, keep the failure output and test count in the log, skip the 10-minute diagnostics collection on failure. Drop the Debug build the test run already does. - actionlint tarball is checksum-verified; Xcode selection lives in one composite action; master runs are grouped per commit; no workflow_dispatch; the title-check token is read-only; the "!" title match follows the conventional-commit parser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- API check also fails on a raised iOS deployment target without "!", reads the PR title live (a re-run reuses the old payload), cancels only on a new commit, and puts just the verdict in the step summary. Logic moved to .github/scripts/api-check.sh so it is shellchecked and testable. - Floor type-check: parse major.minor from exactly one .iOS(.vNN) entry, pass the SwiftPM defines/package name, fail loudly on manifest shapes it does not model and on an empty source list, one DEBUG pass instead of two. - Build: arm64-only Release build, plus `swift build` for the macOS path. - Lint: shellcheck the scripts, which actionlint does not cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- API check: new DashIcon cases are not counted as breaking (every icon import adds them); the summary verdict also matches the singular "1 breaking change detected" and drops OSC-8 hyperlinks; build at the package's own platform instead of the SDK version; no temp file. - Simulator: compare runtimes by major.minor against the SDK and pick the newest runtime that actually has an iPhone. - Type-check: guard tools version, Package@swift-*.swift and release- or device-only branches it does not cover; clean up on failure too. - ios-floor.sh ignores trailing comments and names the base manifest. - Xcode selection moved into a shellchecked script. - Title check on action-semantic-pull-request v6.1.1 (Node 24). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The swiftc type-check at iOS 14 checked a configuration no toolchain that reads this manifest can build: swift-tools-version 6.3 needs Xcode 26.4+, which raises the target to iOS 15. The only consumer is on iOS 18 and #15 moves the floor there, after which the regular build catches newer APIs. - API check: raising swift-tools-version is a break too; the digester output streams to the log while it runs. - pick-simulator.sh reads simctl JSON through files, not arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Build the Release configuration for devices, the slice that ships. - API check: skip closed PRs (`edited` fires there too), keep GH_TOKEN away from the PR build, accept any whitespace/case in the swift-tools-version header, clearer version_raised helper. - pick-simulator.sh: simctl failures surface before jq. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
- Job names say what they check: "Build: iOS device + macOS", "Unit tests (iOS Simulator)", "Lint CI config (actionlint, shellcheck)", and "Breaking changes / Public API, iOS floor, tools version". - The API check failed on the runner (Swift 6.3) with "Unable to parse empty data": the native build system, the default there, cannot feed the digester for an iOS cross-build. Select swiftbuild explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Issue being fixed or feature implemented
The only check on this repo was
Validate PR title. Nothing compiled the library on a PR, so a change that does not build, fails its tests, or breaks the public API that dashwallet-ios uses could be merged.What was done?
ci.yml— on every PR and on pushes tomaster:generic/platform=iOS), plusswift buildon macOS (the documented local build, which also compiles the AppKit branches)..github/scripts/pick-simulator.sh). It runs on the simulator because the#if canImport(UIKit)files are compiled out on macOS..github/scripts/*.sh.api-check.yml— Breaking changes / Public API, iOS floor, tools version fails on a breaking change unless the PR title declares it with a conventional-commit!(feat!: …,feat(scope)!: …). It compares the PR merge commit with its first parent, the base it was merged onto. It counts:swift package diagnose-api-breaking-changes. The package is built for the iOS Simulator, because on the macOS host the UIKit-only public API does not exist and was never compared;swift-tools-version.New
DashIcon.*enum cases are not counted, because every icon import adds them. The title is read live from the API, since a re-run reuses the old event payload. A new commit cancels the running check. A body edit (CodeRabbit) queues a new run instead of cancelling, so the required check is never left pending. The logic lives in.github/scripts/api-check.sh.Also:
action-semantic-pull-requestv6.1.1 (Node 24) and gets a read-only token.pull_request_targetwould otherwise get the repo's default write token..github/actions/select-xcode, 26.6).ciprefix so its PR titles pass the title check.Known gaps:
@availableon a single public declaration is not detected, because the digester ignores availability. It belongs in the convention checks planned next.workflow_dispatchis deliberately absent. A dispatched run on a PR branch posts checks with the same names on the head SHA, and that could mask a failing merge-ref result.edited, andci.ymldoesn't listen to it, so that CodeRabbit body edits don't rebuild everything.After merge:
Build: iOS device + macOS,Unit tests (iOS Simulator),Lint CI config (actionlint, shellcheck)andPublic API, iOS floor, tools versionto themasterruleset as required checks, pinned to GitHub Actions. Until then a red result informs but doesn't block.chore!:in its title, because raising the floor to iOS 18 is breaking for consumers by this rule.How Has This Been Tested?
Locally with Xcode 27. The runner uses Xcode 26.6, and this PR's own run is the first time the workflows run on it.
swift buildpasses, and 16/16 tests pass on an iPhone 17 (iOS 27) picked by the script.api-check.shwas run on simulatedgit merge --no-ffcommits ontomaster:ci: …Toast.initlabel renamed (UIKit-only file)feat: …/feat(toast)!: …DashIcon.Menucasefeat(icons): …DashIcon.Menucase +Toast.initchangefeat: ….iOS(.v14)→.iOS(.v15)chore: …/chore!: …chore: …/chore!: …swift buildand 16/16 tests also pass.Breaking Changes
None. These are CI changes only. No Swift sources,
Package.swift, docs or assets are touched.Checklist:
🤖 Generated with Claude Code
Summary by CodeRabbit