78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
version: "3"
|
|
silent: true
|
|
|
|
tasks:
|
|
default:
|
|
desc: Run all checks (analyze + unit tests + widget 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 pre-commit hooks (requires pre-commit; see .pre-commit-config.yaml)
|
|
cmds:
|
|
- pre-commit install
|
|
|
|
codegen:
|
|
desc: Generate Drift DB code (run after any schema change)
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- flutter pub run build_runner build --delete-conflicting-outputs
|
|
|
|
analyze:
|
|
desc: Static analysis (flutter analyze)
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- scripts/run_analyze.sh
|
|
|
|
analyze-fix:
|
|
desc: Auto-fix lint issues with dart fix --apply
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- dart fix --apply
|
|
|
|
test:
|
|
desc: Unit tests + coverage gate (fails if any non-excluded lib/ file is missing)
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- scripts/run_unit_tests.sh
|
|
|
|
test-widget:
|
|
desc: Widget tests — headless, no display or network required
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- flutter test test/widget/
|
|
|
|
test-flutter:
|
|
desc: Full Flutter test suite (unit + widget + integration)
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- flutter test
|
|
|
|
integration:
|
|
desc: Integration tests against a local Stalwart mail server
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- stalwart-dev/test.sh
|
|
|
|
build-android:
|
|
desc: Build a release APK (output in build/app/outputs/flutter-apk/)
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- flutter build apk --release
|
|
|
|
run:
|
|
desc: Run the app on Linux desktop
|
|
deps: [_nix-check]
|
|
cmds:
|
|
- flutter run -d linux
|
|
|
|
check:
|
|
desc: All fast checks — analyze + unit tests + widget tests + integration in parallel
|
|
deps: [analyze, test, test-widget, integration]
|