Files
sharedinbox/Taskfile.yml
T
Thomas GüttlerandClaude Sonnet 4.6 662acb42cb Fix: use flutter test/flutter pub run instead of bare dart commands
The project depends on the Flutter SDK so dart pub/dart test fail with
"version solving failed". Switch task:test to flutter test and
task:codegen to flutter pub run build_runner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 08:38:09 +02:00

80 lines
1.8 KiB
YAML

version: "3"
tasks:
default:
desc: Run all checks (analyze + unit tests, in parallel)
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:
desc: Generate Drift DB code (run after any schema change)
deps: [_nix-check]
cmds:
- |
START=$(date +%s)
flutter pub run build_runner build --delete-conflicting-outputs
END=$(date +%s)
echo "codegen: $((END - START))s"
analyze:
desc: Static analysis with flutter analyze + analysis_options.yaml rules
deps: [_nix-check]
cmds:
- |
START=$(date +%s)
flutter analyze
END=$(date +%s)
echo "analyze: $((END - START))s"
analyze-fix:
desc: Auto-fix lint issues with dart fix --apply
deps: [_nix-check]
cmds:
- dart fix --apply
test:
desc: Run unit tests (no device needed)
deps: [_nix-check]
cmds:
- |
START=$(date +%s)
flutter test test/unit/
END=$(date +%s)
echo "test: $((END - START))s"
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"
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:
desc: All fast checks — analyze + unit tests in parallel
deps: [analyze, test]