tane/.gitlab-ci.yml
vjrj 4e8b8293e0 feat(block1): bundled species catalog + autocomplete link
Add a small curated catalog of Iberian horticultural species and let a variety
be linked to it from the edit sheet.

- assets/catalog/species.json: 14 species with botanical family and ES/EN
  common names (wikidata_qid/gbif_key deferred to the varilla enrichment).
- SpeciesRepository: idempotent seedBundled (is_bundled rows, keyed by
  scientific name) + search by scientific/common name with a locale-best label.
  Seeded on startup from DI.
- VarietyRepository.linkSpecies: sets species_id and prefills category from the
  species' family when empty (never overwrites an existing category).
  VarietyDetail now carries the scientific name.
- Edit sheet gains a live species-search field; the detail view shows the
  scientific name (italic). i18n strings added (ES/EN).

Tests: catalog parse, idempotent seeding, search by scientific/common name,
linkSpecies prefill semantics, and a widget test for the autocomplete → link →
scientific-name-shown flow. Full suite: 32 passing, 0 skipped.
2026-07-07 21:21:59 +02:00

55 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
# Generated sources (Drift, slang) must exist before analysis/tests.
- 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