test: include integration test coverage in coverage gate

- Add lcov to nix flake (required for flutter --merge-coverage)
- stalwart-dev/test.sh: collect and merge coverage when unit baseline exists
- run_unit_tests.sh: remove inline coverage check (now in dedicated task)
- Taskfile: add coverage task; check runs test → integration → coverage
  sequentially so the gate sees combined unit + integration data
- check-fast (pre-commit) omits coverage gate since integration tests
  don't run there; full gate runs only in task check
- Drop two untestable fake-only tests (UID-validity reset, malformed envelope)
- Coverage threshold restored to 80% (84% with merged data)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Güttler
2026-04-21 08:27:16 +02:00
co-authored by Claude Sonnet 4.6
parent ef7974a60a
commit 1820487c46
6 changed files with 28 additions and 60 deletions
+11 -2
View File
@@ -131,10 +131,19 @@ tasks:
cmds:
- fvm flutter run -d linux --no-pub
coverage:
desc: Coverage gate — run after test (and optionally integration) have written lcov.info
deps: [_nix-check]
cmds:
- fvm dart run scripts/check_coverage.dart
check-fast:
desc: Pre-commit checks — analyze + unit tests + widget tests (no build, no integration)
deps: [analyze, test, test-widget]
check:
desc: Full check suite — analyze + unit tests + widget tests + build-linux + integration in parallel
deps: [analyze, test, test-widget, build-linux, integration]
desc: Full check suite — unit tests first, then integration (merges coverage), then gate
deps: [analyze, test-widget, build-linux, test]
cmds:
- task: integration
- task: coverage