Files
sharedinbox/Taskfile.yml
T

70 lines
1.5 KiB
YAML
Raw Normal View History

version: "3"
tasks:
default:
desc: Run all checks (analyze + test, 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: Run build_runner to generate Drift and Riverpod code
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: Run flutter analyze
deps: [_nix-check]
cmds:
- |
START=$(date +%s)
flutter analyze
END=$(date +%s)
echo "analyze: $((END - START))s"
analyze-fix:
desc: Auto-fix with dart fix --apply
deps: [_nix-check]
cmds:
- dart fix --apply
test:
desc: Run unit tests
deps: [_nix-check]
cmds:
- |
START=$(date +%s)
flutter test
END=$(date +%s)
echo "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 checks — analyze + unit tests in parallel
deps: [analyze, test]