Repository navigation
Add CI: lint, test and build checks for Android and iOS - #20
Merged
Merged
Conversation
Every pull request now gets checked for formatting, tests, and that both platforms build — with the same checks runnable locally from one command. Kotlin formatting is Spotless + ktlint, ratcheted to origin/main. The ratchet is the core of the design: it limits both spotlessCheck and spotlessApply to files that differ from origin/main, so the baseline is green on day one with no repo-wide reformat commit (which would have conflicted with every branch in flight) and format debt is paid down file by file as code is naturally touched. CI must therefore check out with fetch-depth: 0, and fetches origin/main by name, or the ratchet cannot resolve its base ref. .editorconfig disables the three ktlint rules that report violations ktlint cannot auto-fix — function-naming (Composables are PascalCase), property-naming (so are private design-token constants) and kdoc (dangling file-level KDoc). Leaving any of them on would break spotlessApply, not just spotlessCheck. Swift uses swift-format, which ships inside Xcode, so there is nothing to install. Its `rules` block is written out in full rather than as a delta: swift-format treats a missing key as false, so a partial block silently disables every rule it omits and turns lint into a no-op. Only TypeNamesShouldBeCapitalized is changed from the default, for `iOSApp`. CI only ever checks. There is no spotlessApply, no --in-place and no auto-commit step anywhere in the workflow; applying formatting is the contributor's job, locally. Verified locally: make check and make ci both green (125 JVM tests, 126 iOS tests, debug APK produced, both frameworks linked), and the lint-fails → format → lint-passes round trip works. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Every PR now gets checked for formatting, tests, and that both platforms build, in two parallel jobs —
lint-test-androidonubuntu-latest(Spotless/ktlint, JVM tests, debug APK) andiosonmacos-latest(swift-format, iOS simulator tests, framework link for simulator + device) — with the same checks runnable locally viamake check/make ci.Kotlin formatting is ratcheted to
origin/main, so bothspotlessCheckandspotlessApplyonly ever touch files that differ from it: the baseline is green with no repo-wide reformat commit to conflict with in-flight branches, and format debt is paid down file by file as code is naturally edited. CI only ever checks — there is nospotlessApply, no--in-placeand no auto-commit anywhere in the workflow, so unformatted code fails the PR and the contributor runsmake format..editorconfigdisables the three ktlint rules whose violations ktlint cannot auto-fix (function-naming,property-naming,kdoc), since leaving them on would breakspotlessApplyrather than just the check;.swift-formatspells out itsrulesblock in full because swift-format treats a missing key asfalseand a partial block silently turns lint into a no-op. No secrets are needed —generateSupabaseConfigfalls back to placeholders andSupabaseIntegrationTestself-skips.Verified locally:
make checkandmake ciboth green (125 JVM tests, 126 iOS tests, APK produced, both frameworks linked), plus the lint-fails → format → lint-passes round trip.🤖 Generated with Claude Code