kell_creations/kell_creations_apps/tools
Mike Kell bda93640e4 feat(auth): Stage 8C - authentication foundation
- Add KcUser/KcUserRole domain models with copyWith, equality, toString
- Add AuthState sealed hierarchy (unauthenticated, loading, authenticated, error)
- Add AuthService abstract contract (signIn, signOut, refreshSession, stream)
- Add AuthException with optional HTTP statusCode
- Add CredentialStore abstract contract with CredentialKeys constants
- Add InMemoryCredentialStore implementation
- Add FakeAuthService with role-based sign-in simulation
- Add KcAppEnvironment.square to core enum with SQ label
- Add KcBootstrap square case (falls back to fake until Stage 10A)
- Update kell_web and kell_mobile shell environment badges for square case
- Add integrations dependency to kell_web and kell_mobile pubspec.yaml
- Add auth to run_all_tests.sh TESTABLE and ANALYZABLE lists
- Add 42 auth tests (42/42 passing)
- Add 1 new core test for square bootstrap fallback (21/21 passing)
- Update master_development_brief.md: Stage 8C complete, Stage 8 complete
- Total: 764/764 tests passing, dart analyze clean

Stage 8 (infrastructure package activation) is now complete.
Next: feat/wc-orders-integration (Stage 9A)
2026-07-11 08:48:18 -04:00
..
README.md feat(ci): add test coverage visibility to CI pipeline (Stage 4D) 2026-05-22 10:22:05 -04:00
collect_coverage.sh feat(ci): add test coverage visibility to CI pipeline (Stage 4D) 2026-05-22 10:22:05 -04:00
run_all_tests.sh feat(auth): Stage 8C - authentication foundation 2026-07-11 08:48:18 -04:00

README.md

Tools

CI/CD helper scripts for the Kell Creations Flutter monorepo.

Scripts

run_all_tests.sh

Runs flutter test across all testable packages and apps, producing a per-package pass/fail summary.

Usage:

# From kell_creations_apps/ directory
./tools/run_all_tests.sh           # Run tests only
./tools/run_all_tests.sh --analyze # Run dart analyze + tests

What it does:

  1. Installs dependencies (flutter pub get) for all packages and apps.
  2. Optionally runs dart analyze --fatal-infos on each package/app.
  3. Runs flutter test --reporter expanded for packages with tests.
  4. Prints an aggregate pass/fail summary table.

Adding new packages:

When a new package gains tests, add its path to the TESTABLE array in the script. For packages that should be analyzed but have no tests yet, add to the ANALYZABLE array only.

Exit codes:

  • 0 — all tests passed (and analyze clean, if --analyze was used)
  • 1 — one or more failures detected

collect_coverage.sh

Runs flutter test --coverage across all testable packages and apps, parses the generated lcov.info files, and produces a combined summary table with test counts and line coverage percentages.

Usage:

# From kell_creations_apps/ directory
./tools/collect_coverage.sh

What it does:

  1. Installs dependencies (flutter pub get) for testable packages.
  2. Runs flutter test --coverage --reporter expanded for each package.
  3. Parses coverage/lcov.info to extract lines hit / lines found per package.
  4. Prints an aggregate summary table with pass/fail counts and coverage percentages.

Output example:

╔═══════════════════════════════════════════════════════════╗
║          Flutter Test & Coverage Summary                 ║
╠═══════════════════════════════════════════════════════════╣
║ Package              Pass    Fail    Lines    Coverage   ║
╠═══════════════════════════════════════════════════════════╣
║ core                 20      0       120/150  80.0%      ║
║ design_system        41      0       95/110   86.4%      ║
║ ...                                                      ║
╠═══════════════════════════════════════════════════════════╣
║ TOTAL                379     0       500/600  83.3%      ║
╚═══════════════════════════════════════════════════════════╝

Exit codes:

  • 0 — all tests passed
  • 1 — one or more failures detected

CI Workflows

The corresponding Forgejo Actions workflows live in .forgejo/workflows/:

Workflow Trigger Purpose
flutter-analyze.yml PRs and branches Runs dart analyze on all packages and apps
flutter-test.yml PRs and branches Runs flutter test with result reporting
validate-docs.yml Non-main branches Validates MkDocs documentation build
publish-docs.yml Push to main Publishes documentation to docs host