Rework quantities the way seeds are actually described — a number of an informal
unit — and let a lot hold seeds or plants (plantel).
Quantity model (commons_core):
- Quantity is now { kind, count?, label } — "3 cobs", "2 packets", "a few".
Count is optional; uncountable vibes (a few, some, pinch) carry no number.
- QuantityKind reorganised into an ascending scale: vibes → containers
(teaspoon/spoon/cup/jar/sack) → seed & fruit forms → plant units, each tagged
countable/not. Stored by name; count reuses the existing numeric column.
Lot type (schema v2):
- Lots gain a `type` (seed | plant); germination stays meaningful for seeds.
schemaVersion 2 with a from1To2 migration (adds the column), drift_schema_v2
exported, migration test covers v1→v2.
UI:
- New QuantityPicker: a horizontal scale of large seed-glyph icons + a number
stepper (shown only for countable units), plus a seed/plant SegmentedButton.
Used in quick-add and add-lot. Lot lines render "3 cobs" / "a few".
- i18n: unit singular/plural (ES/EN, Weblate-friendly), lot-type labels.
Build: slang moved to its CLI (disabled in build_runner to avoid a multi-file
collision); CI runs `dart run slang` before build_runner. 38 tests green,
Linux migrates the existing v1 DB and runs.
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
# CI for Tanemaki. Mirrors the local verification gate (analyze + test +
|
|
# coverage) from docs/design/testing.md. Adapt to GitHub Actions if the
|
|
# canonical remote changes; the commands are the same.
|
|
#
|
|
# Uses the official Flutter Docker image. Pin the version to match the
|
|
# developer toolchain (Flutter 3.41.x / Dart 3.11.x).
|
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
|
|
|
stages:
|
|
- analyze
|
|
- test
|
|
|
|
variables:
|
|
PUB_CACHE: "$CI_PROJECT_DIR/.pub-cache"
|
|
|
|
cache:
|
|
key: "$CI_COMMIT_REF_SLUG"
|
|
paths:
|
|
- .pub-cache/
|
|
|
|
before_script:
|
|
# SQLCipher so the "no plaintext at rest" security test actually runs (it
|
|
# skips where the library is absent). The -dev package ships the unversioned
|
|
# libsqlcipher.so symlink, which package:sqlite3 loads reliably.
|
|
- apt-get update -qq && apt-get install -y -qq libsqlcipher-dev
|
|
- flutter --version
|
|
- flutter pub get
|
|
|
|
analyze:
|
|
stage: analyze
|
|
script:
|
|
- dart format --output=none --set-exit-if-changed .
|
|
- flutter analyze
|
|
|
|
test:commons_core:
|
|
stage: test
|
|
script:
|
|
- cd packages/commons_core
|
|
- dart test
|
|
|
|
test:app_seeds:
|
|
stage: test
|
|
script:
|
|
- cd apps/app_seeds
|
|
# slang is generated via its CLI (disabled in build_runner); Drift via build_runner.
|
|
- dart run slang
|
|
- dart run build_runner build --delete-conflicting-outputs
|
|
- flutter test --coverage
|
|
coverage: '/lines\.*: \d+\.\d+\%/'
|
|
artifacts:
|
|
paths:
|
|
- apps/app_seeds/coverage/lcov.info
|
|
reports:
|
|
coverage_report:
|
|
coverage_format: cobertura
|
|
path: apps/app_seeds/coverage/cobertura.xml
|