2026-04-16 07:40:34 +02:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
|
default:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: Run all checks (analyze + unit tests, in parallel)
|
2026-04-16 07:40:34 +02:00
|
|
|
deps: [check]
|
|
|
|
|
|
|
|
|
|
_nix-check:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test "${DIRENV_DIR#-}" = "{{.TASKFILE_DIR}}"
|
|
|
|
|
msg: "Not in nix dev shell. Run: nix develop"
|
|
|
|
|
|
|
|
|
|
codegen:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: Generate Drift DB code (run after any schema change)
|
2026-04-16 07:40:34 +02:00
|
|
|
deps: [_nix-check]
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
START=$(date +%s)
|
|
|
|
|
dart run build_runner build --delete-conflicting-outputs
|
|
|
|
|
END=$(date +%s)
|
|
|
|
|
echo "codegen: $((END - START))s"
|
|
|
|
|
|
|
|
|
|
analyze:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: Static analysis with flutter analyze + analysis_options.yaml rules
|
2026-04-16 07:40:34 +02:00
|
|
|
deps: [_nix-check]
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
START=$(date +%s)
|
|
|
|
|
flutter analyze
|
|
|
|
|
END=$(date +%s)
|
|
|
|
|
echo "analyze: $((END - START))s"
|
|
|
|
|
|
|
|
|
|
analyze-fix:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: Auto-fix lint issues with dart fix --apply
|
2026-04-16 07:40:34 +02:00
|
|
|
deps: [_nix-check]
|
|
|
|
|
cmds:
|
|
|
|
|
- dart fix --apply
|
|
|
|
|
|
|
|
|
|
test:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: Run pure-Dart unit tests (no device needed)
|
2026-04-16 07:40:34 +02:00
|
|
|
deps: [_nix-check]
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
START=$(date +%s)
|
2026-04-16 08:11:29 +02:00
|
|
|
dart test test/unit/
|
2026-04-16 07:40:34 +02:00
|
|
|
END=$(date +%s)
|
|
|
|
|
echo "test: $((END - START))s"
|
|
|
|
|
|
2026-04-16 08:11:29 +02:00
|
|
|
test-flutter:
|
|
|
|
|
desc: Run Flutter widget tests
|
|
|
|
|
deps: [_nix-check]
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
START=$(date +%s)
|
|
|
|
|
flutter test
|
|
|
|
|
END=$(date +%s)
|
|
|
|
|
echo "flutter test: $((END - START))s"
|
|
|
|
|
|
2026-04-16 07:40:34 +02:00
|
|
|
integration:
|
|
|
|
|
desc: Run integration tests (starts and stops Stalwart automatically)
|
|
|
|
|
deps: [_nix-check]
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
START=$(date +%s)
|
|
|
|
|
stalwart-dev/test.sh
|
|
|
|
|
END=$(date +%s)
|
|
|
|
|
echo "integration: $((END - START))s"
|
|
|
|
|
|
|
|
|
|
run:
|
|
|
|
|
desc: Run the app on Linux desktop
|
|
|
|
|
deps: [_nix-check]
|
|
|
|
|
cmds:
|
|
|
|
|
- flutter run -d linux
|
|
|
|
|
|
|
|
|
|
check:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: All fast checks — analyze + unit tests in parallel
|
2026-04-16 07:40:34 +02:00
|
|
|
deps: [analyze, test]
|