chore: add PR CI workflow + BIPPath smoke tests#13
Merged
Conversation
Adds a Tier 1 quality-gate workflow (`flutter analyze` + `flutter test`)
that runs on every PR and every push to develop/main. Closes the gap
where consumers (realunit-app, future DFX Wallet) pin SDK versions
produced by auto-tag without any prior quality check.
Also seeds `test/bitbox_flutter_test.dart` with smoke tests for the
pure-logic BIPPath helper so the test job has something meaningful to
run (was previously `void main() {}`).
Future work tracked separately: dart format baseline, native iOS/Android
build smoke checks, BLE-layer pure-logic extraction + unit tests.
Existing avoid_print infos in BLE debug code are intentional and out of scope for this PR. Treat warnings/errors as fatal but allow infos to remain informational. Format/print cleanup tracked separately.
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.
Summary
Adds a Tier 1 code-quality CI gate (
flutter analyze+flutter test) for every PR and push todevelop/main. Closes the gap where this SDK had zero quality gates before tagging:auto-tag.yamlblindly tagged every merge as a new SDK version (v0.0.X) regardless of analyze/test results, and consumers pin to those tags.Also seeds
test/bitbox_flutter_test.dartwith smoke tests for the pure-logicBIPPathhelper so the test job has something meaningful to run (was previouslyvoid main() {}).What's in scope
.github/workflows/pull-request.yaml— runsflutter pub get,flutter analyze,flutter teston UbuntuBIPPath.fromString/fromPathArraycovering hardened, non-hardened, requireRoot variantsWhat's NOT in scope (separate follow-ups)
dart format --set-exit-if-changed— current code has 6 files needing reformatting; format baseline is its own PR to avoid mixing concerns hereisInitFramedetection inBluetooth.swiftwould benefit from a testable Dart equivalent)Test plan
flutter analyzeclean (15 info-level only, exit 0)flutter testpasses (5/5 BIPPath tests)analyze-and-testcheck to branch protection ondevelopandmain(Settings change, document in PR comment)Pinning rationale
Flutter version
3.41.6matches whatDFXswiss/realunit-appuses. Bump in lockstep when the consumer bumps.Motivation
Issues that proper CI would have caught:
bitbox_flutterPR fix: remove broken packet deduplication from BLE read path #6 removed packet dedup → broke long EIP-712 sign flows inrealunit-app→ only surfaced when running the 13-page sign on hardwareNeither was a pure-logic regression that
flutter analyzecatches, but the BLE-layer issues hid behind the absence of any quality gate at all. Even simple regressions (typo'd imports, missing types) would land unblocked today.