Files
sharedinbox/Taskfile.yml
T

74 lines
1.7 KiB
YAML
Raw Normal View History

version: "3"
2026-04-16 11:48:37 +02:00
silent: true
tasks:
default:
2026-04-16 11:48:37 +02:00
desc: Run all checks (analyze + unit tests + integration, 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"
install-hooks:
desc: Install git hooks from hooks/ into .git/hooks/
cmds:
- cp hooks/pre-commit .git/hooks/pre-commit
- chmod +x .git/hooks/pre-commit
- echo "Installed hooks/pre-commit → .git/hooks/pre-commit"
codegen:
desc: Generate Drift DB code (run after any schema change)
deps: [_nix-check]
cmds:
2026-04-16 11:48:37 +02:00
- flutter pub run build_runner build --delete-conflicting-outputs
analyze:
2026-04-16 11:48:37 +02:00
desc: Static analysis (flutter analyze)
deps: [_nix-check]
cmds:
2026-04-16 11:48:37 +02:00
- scripts/run_analyze.sh
analyze-fix:
desc: Auto-fix lint issues with dart fix --apply
deps: [_nix-check]
cmds:
- dart fix --apply
test:
2026-04-16 11:48:37 +02:00
desc: Unit tests + coverage gate (fails if any non-excluded lib/ file is missing)
deps: [_nix-check]
cmds:
2026-04-16 11:48:37 +02:00
- scripts/run_unit_tests.sh
test-flutter:
2026-04-16 11:48:37 +02:00
desc: Flutter widget tests
deps: [_nix-check]
cmds:
2026-04-16 11:48:37 +02:00
- flutter test
integration:
2026-04-16 11:48:37 +02:00
desc: Integration tests against a local Stalwart mail server
deps: [_nix-check]
cmds:
2026-04-16 11:48:37 +02:00
- stalwart-dev/test.sh
build-android:
desc: Build a release APK (output in build/app/outputs/flutter-apk/)
deps: [_nix-check]
cmds:
2026-04-16 11:48:37 +02:00
- flutter build apk --release
run:
desc: Run the app on Linux desktop
deps: [_nix-check]
cmds:
- flutter run -d linux
check:
2026-04-16 11:48:37 +02:00
desc: All fast checks — analyze + unit tests + integration in parallel
deps: [analyze, test, integration]