Files
sharedinbox/Taskfile.yml
T

80 lines
1.8 KiB
YAML
Raw Normal View History

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)
dart 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 pure-Dart unit tests (no device needed)
deps: [_nix-check]
cmds:
- |
START=$(date +%s)
dart 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]