2026-04-16 07:40:34 +02:00
|
|
|
version: "3"
|
2026-04-16 11:48:37 +02:00
|
|
|
silent: true
|
2026-04-16 07:40:34 +02:00
|
|
|
|
2026-05-17 22:15:05 +02:00
|
|
|
env:
|
|
|
|
|
DAGGER_NO_NAG: "1"
|
|
|
|
|
|
2026-04-16 07:40:34 +02:00
|
|
|
tasks:
|
|
|
|
|
default:
|
2026-04-16 15:14:18 +02:00
|
|
|
desc: Run all checks (analyze + unit tests + widget tests + integration, in parallel)
|
2026-04-16 07:40:34 +02:00
|
|
|
deps: [check]
|
|
|
|
|
|
2026-05-09 18:49:34 +02:00
|
|
|
_nix-check:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
|
|
|
|
cmds:
|
|
|
|
|
- cmd: |
|
|
|
|
|
if ! nix show-config experimental-features 2>/dev/null | grep -q "nix-command" || ! nix show-config experimental-features 2>/dev/null | grep -q "flakes"; then
|
|
|
|
|
echo "CRITICAL: Nix experimental features 'nix-command' and 'flakes' must be enabled."
|
|
|
|
|
echo "Attempting to fix by updating ~/.config/nix/nix.conf ..."
|
|
|
|
|
mkdir -p ~/.config/nix
|
|
|
|
|
CONF=~/.config/nix/nix.conf
|
|
|
|
|
if [ ! -f "$CONF" ]; then
|
|
|
|
|
echo "experimental-features = nix-command flakes" > "$CONF"
|
|
|
|
|
elif ! grep -q "experimental-features" "$CONF"; then
|
|
|
|
|
echo "experimental-features = nix-command flakes" >> "$CONF"
|
|
|
|
|
elif ! grep -E "experimental-features.*nix-command" "$CONF" || ! grep -E "experimental-features.*flakes" "$CONF"; then
|
|
|
|
|
echo "Your $CONF already has experimental-features but is missing 'nix-command' or 'flakes'."
|
|
|
|
|
echo "Please add them manually to the 'experimental-features' line."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "Local configuration updated. Please re-run your command."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2026-04-25 07:12:56 +02:00
|
|
|
_preflight:
|
2026-04-16 07:40:34 +02:00
|
|
|
internal: true
|
|
|
|
|
run: once
|
2026-05-09 18:49:34 +02:00
|
|
|
deps: [_nix-check]
|
2026-04-16 07:40:34 +02:00
|
|
|
preconditions:
|
2026-05-13 06:05:55 +02:00
|
|
|
- sh: test -n "${IN_NIX_SHELL}"
|
2026-04-16 07:40:34 +02:00
|
|
|
msg: "Not in nix dev shell. Run: nix develop"
|
2026-04-25 07:12:56 +02:00
|
|
|
cmds:
|
|
|
|
|
- scripts/silent_on_success.sh pre-commit install
|
2026-04-16 07:40:34 +02:00
|
|
|
|
2026-04-17 12:17:51 +02:00
|
|
|
_flutter-check:
|
2026-04-17 10:05:31 +02:00
|
|
|
internal: true
|
|
|
|
|
run: once
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight]
|
2026-04-17 12:17:51 +02:00
|
|
|
cmds:
|
2026-04-25 07:07:05 +02:00
|
|
|
- cmd: scripts/silent_on_success.sh fvm install --skip-pub-get
|
2026-05-06 09:58:42 +02:00
|
|
|
- cmd: scripts/silent_on_success.sh fvm use --skip-pub-get
|
|
|
|
|
|
|
|
|
|
setup:
|
|
|
|
|
desc: Fully set up the dev environment (FVM, pub get, codegen, hooks)
|
2026-05-10 11:25:07 +02:00
|
|
|
deps: [_preflight, _codegen, generate-changelog]
|
2026-05-06 09:58:42 +02:00
|
|
|
cmds:
|
|
|
|
|
- echo "Setup complete."
|
2026-04-17 12:17:51 +02:00
|
|
|
|
2026-05-10 11:25:07 +02:00
|
|
|
generate-changelog:
|
|
|
|
|
desc: Generate assets/changelog.txt from git history
|
|
|
|
|
cmds:
|
|
|
|
|
- mkdir -p assets
|
2026-05-10 13:18:35 +02:00
|
|
|
- 'git log -n 50 --pretty=format:"* %ad [%h](https://codeberg.org/guettli/sharedinbox/commit/%H): %s" --date=short > assets/changelog.txt'
|
2026-05-10 11:25:07 +02:00
|
|
|
|
2026-04-17 12:17:51 +02:00
|
|
|
_pub-get:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
|
|
|
|
deps: [_flutter-check]
|
2026-04-17 10:05:31 +02:00
|
|
|
cmds:
|
2026-04-25 07:07:05 +02:00
|
|
|
- scripts/silent_on_success.sh fvm flutter pub get --suppress-analytics
|
2026-04-17 22:20:10 +02:00
|
|
|
|
|
|
|
|
_linux-deps-check:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: command -v clang >/dev/null 2>&1
|
|
|
|
|
msg: "Linux desktop deps missing. Run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev"
|
2026-04-28 12:36:30 +02:00
|
|
|
- sh: pkg-config --exists gtk+-3.0 2>/dev/null
|
2026-04-17 22:20:10 +02:00
|
|
|
msg: "Linux desktop deps missing. Run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev"
|
2026-04-17 10:05:31 +02:00
|
|
|
|
2026-04-16 09:55:15 +02:00
|
|
|
install-hooks:
|
2026-04-16 15:14:18 +02:00
|
|
|
desc: Install pre-commit hooks (requires pre-commit; see .pre-commit-config.yaml)
|
2026-04-16 09:55:15 +02:00
|
|
|
cmds:
|
2026-04-16 15:14:18 +02:00
|
|
|
- pre-commit install
|
2026-04-16 09:55:15 +02:00
|
|
|
|
2026-04-25 07:07:05 +02:00
|
|
|
_codegen:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
|
|
|
|
deps: [_pub-get]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
generates:
|
|
|
|
|
- lib/**/*.g.dart
|
2026-04-25 07:07:05 +02:00
|
|
|
cmds:
|
|
|
|
|
- scripts/silent_on_success.sh fvm flutter pub run build_runner build --delete-conflicting-outputs
|
|
|
|
|
|
2026-04-16 07:40:34 +02:00
|
|
|
codegen:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: Generate Drift DB code (run after any schema change)
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight, _pub-get]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
generates:
|
|
|
|
|
- lib/**/*.g.dart
|
2026-04-16 07:40:34 +02:00
|
|
|
cmds:
|
2026-04-17 22:20:10 +02:00
|
|
|
- fvm flutter pub run build_runner build --delete-conflicting-outputs
|
2026-04-16 07:40:34 +02:00
|
|
|
|
|
|
|
|
analyze:
|
2026-04-16 11:48:37 +02:00
|
|
|
desc: Static analysis (flutter analyze)
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight, _codegen]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- test/**/*.dart
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
- analysis_options.yaml
|
2026-04-16 07:40:34 +02:00
|
|
|
cmds:
|
2026-04-16 11:48:37 +02:00
|
|
|
- scripts/run_analyze.sh
|
2026-04-16 07:40:34 +02:00
|
|
|
|
2026-04-20 18:08:09 +02:00
|
|
|
format:
|
|
|
|
|
desc: Format all Dart source files
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- "**/*.dart"
|
2026-04-20 18:08:09 +02:00
|
|
|
cmds:
|
2026-05-09 18:59:12 +02:00
|
|
|
- fvm dart format lib test
|
2026-04-20 18:08:09 +02:00
|
|
|
|
2026-05-15 10:19:28 +02:00
|
|
|
check-mocks:
|
|
|
|
|
desc: Fail if any *.mocks.dart file is out of date (re-runs build_runner)
|
|
|
|
|
deps: [_preflight, _pub-get]
|
|
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- test/**/*.dart
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
cmds:
|
|
|
|
|
- scripts/check_mocks_fresh.sh
|
|
|
|
|
|
2026-04-16 07:40:34 +02:00
|
|
|
analyze-fix:
|
2026-04-16 08:11:29 +02:00
|
|
|
desc: Auto-fix lint issues with dart fix --apply
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- test/**/*.dart
|
2026-04-16 07:40:34 +02:00
|
|
|
cmds:
|
2026-04-17 22:20:10 +02:00
|
|
|
- fvm dart fix --apply
|
2026-04-16 07:40:34 +02:00
|
|
|
|
|
|
|
|
test:
|
2026-04-16 11:48:37 +02:00
|
|
|
desc: Unit tests + coverage gate (fails if any non-excluded lib/ file is missing)
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight, _codegen]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- test/unit/**/*.dart
|
|
|
|
|
generates:
|
|
|
|
|
- coverage/lcov.info
|
2026-04-16 07:40:34 +02:00
|
|
|
cmds:
|
2026-04-16 11:48:37 +02:00
|
|
|
- scripts/run_unit_tests.sh
|
2026-04-16 07:40:34 +02:00
|
|
|
|
2026-04-16 15:14:18 +02:00
|
|
|
test-widget:
|
|
|
|
|
desc: Widget tests — headless, no display or network required
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight, _codegen]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- test/widget/**/*.dart
|
2026-04-16 15:14:18 +02:00
|
|
|
cmds:
|
2026-04-17 10:05:31 +02:00
|
|
|
- scripts/run_widget_tests.sh
|
2026-04-16 15:14:18 +02:00
|
|
|
|
2026-04-16 08:11:29 +02:00
|
|
|
test-flutter:
|
2026-04-16 15:14:18 +02:00
|
|
|
desc: Full Flutter test suite (unit + widget + integration)
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- test/**/*.dart
|
|
|
|
|
- integration_test/**/*.dart
|
2026-04-16 08:11:29 +02:00
|
|
|
cmds:
|
2026-04-17 22:20:10 +02:00
|
|
|
- fvm flutter test
|
2026-04-16 08:11:29 +02:00
|
|
|
|
2026-05-17 09:15:53 +02:00
|
|
|
test-backend:
|
2026-05-17 16:01:42 +02:00
|
|
|
desc: Backend tests against a local Stalwart mail server (via Dagger)
|
2026-04-16 07:40:34 +02:00
|
|
|
cmds:
|
2026-05-17 22:15:05 +02:00
|
|
|
- dagger call --progress=plain -q -m ci --source=. test-backend
|
2026-04-16 07:40:34 +02:00
|
|
|
|
2026-04-25 17:55:52 +02:00
|
|
|
integration-ui:
|
2026-05-17 16:01:42 +02:00
|
|
|
desc: UI E2E tests on Linux via Xvfb — headless, no emulator needed (via Dagger)
|
|
|
|
|
cmds:
|
2026-05-17 22:15:05 +02:00
|
|
|
- dagger call --progress=plain -q -m ci --source=. test-integration
|
2026-05-17 16:01:42 +02:00
|
|
|
|
|
|
|
|
sync-reliability:
|
|
|
|
|
desc: Run sync reliability runner (via Dagger)
|
|
|
|
|
cmds:
|
2026-05-17 22:15:05 +02:00
|
|
|
- dagger call --progress=plain -q -m ci --source=. test-sync-reliability
|
2026-05-17 16:01:42 +02:00
|
|
|
|
2026-05-21 10:28:28 +02:00
|
|
|
ci-graph:
|
|
|
|
|
desc: Print a Mermaid diagram of the CI pipeline — paste into mermaid.live or any Markdown renderer
|
|
|
|
|
cmds:
|
|
|
|
|
- dagger call --progress=plain -q -m ci --source=. graph
|
|
|
|
|
|
2026-05-17 16:01:42 +02:00
|
|
|
stalwart:
|
|
|
|
|
desc: Start a Stalwart instance for local development (via Dagger)
|
2026-04-25 17:55:52 +02:00
|
|
|
cmds:
|
2026-05-17 16:01:42 +02:00
|
|
|
- echo "Starting Stalwart on default ports (JMAP=8080, IMAP=1430, SMTP=1025, SIEVE=4190)"
|
2026-05-17 22:15:05 +02:00
|
|
|
- dagger call --progress=plain -q -m ci --source=. stalwart up --ports 8080:8080 --ports 1430:1430 --ports 1025:1025 --ports 4190:4190
|
2026-05-17 16:43:52 +02:00
|
|
|
|
|
|
|
|
deploy-linux:
|
|
|
|
|
desc: Build and deploy Linux release via Dagger
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_PRIVATE_KEY"
|
|
|
|
|
msg: "SSH_PRIVATE_KEY is not set"
|
|
|
|
|
cmds:
|
2026-05-17 22:15:05 +02:00
|
|
|
- HASH=$(git rev-parse --short HEAD) && dagger call --progress=plain -q -m ci --source=. deploy-linux --ssh-key env:SSH_PRIVATE_KEY --ssh-user "$SSH_USER" --ssh-host "$SSH_HOST" --commit-hash "$HASH"
|
2026-05-17 16:43:52 +02:00
|
|
|
|
2026-05-18 08:18:33 +02:00
|
|
|
build-android-bundle:
|
2026-05-18 13:35:20 +02:00
|
|
|
desc: Build AAB via Dagger (cached, versionCode=1 placeholder) and export locally
|
2026-05-18 08:18:33 +02:00
|
|
|
cmds:
|
|
|
|
|
- mkdir -p build/app/outputs/bundle/release
|
2026-05-18 13:35:20 +02:00
|
|
|
- dagger call --progress=plain -q -m ci --source=. build-android-release -o build/app/outputs/bundle/release/app-release.aab
|
2026-05-18 08:18:33 +02:00
|
|
|
|
|
|
|
|
upload-android-bundle:
|
|
|
|
|
desc: Upload AAB from build/ to Play Store via Dagger
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$PLAY_STORE_CONFIG_JSON"
|
|
|
|
|
msg: "PLAY_STORE_CONFIG_JSON is not set"
|
|
|
|
|
- sh: test -f build/app/outputs/bundle/release/app-release.aab
|
|
|
|
|
msg: "AAB not found — run build-android-bundle first"
|
|
|
|
|
cmds:
|
|
|
|
|
- dagger call --progress=plain -q -m ci --source=. upload-to-play-store --aab build/app/outputs/bundle/release/app-release.aab --play-store-config env:PLAY_STORE_CONFIG_JSON
|
|
|
|
|
|
2026-05-17 16:43:52 +02:00
|
|
|
publish-android:
|
2026-05-18 13:35:20 +02:00
|
|
|
desc: Build cached AAB, stamp versionCode, sign, and publish to Play Store via Dagger
|
2026-05-17 16:43:52 +02:00
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$PLAY_STORE_CONFIG_JSON"
|
|
|
|
|
msg: "PLAY_STORE_CONFIG_JSON is not set"
|
2026-05-18 07:49:45 +02:00
|
|
|
- sh: test -n "$ANDROID_KEYSTORE_BASE64"
|
|
|
|
|
msg: "ANDROID_KEYSTORE_BASE64 is not set"
|
|
|
|
|
- sh: test -n "$ANDROID_KEYSTORE_PASSWORD"
|
|
|
|
|
msg: "ANDROID_KEYSTORE_PASSWORD is not set"
|
2026-05-17 16:43:52 +02:00
|
|
|
cmds:
|
2026-05-18 13:35:20 +02:00
|
|
|
- dagger call --progress=plain -q -m ci --source=. publish-android --play-store-config env:PLAY_STORE_CONFIG_JSON --keystore-base64 env:ANDROID_KEYSTORE_BASE64 --keystore-password env:ANDROID_KEYSTORE_PASSWORD
|
2026-05-17 16:43:52 +02:00
|
|
|
|
|
|
|
|
deploy-apk:
|
|
|
|
|
desc: Build and deploy Android APK via Dagger
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_PRIVATE_KEY"
|
|
|
|
|
msg: "SSH_PRIVATE_KEY is not set"
|
2026-05-18 07:49:45 +02:00
|
|
|
- sh: test -n "$ANDROID_KEYSTORE_BASE64"
|
|
|
|
|
msg: "ANDROID_KEYSTORE_BASE64 is not set"
|
|
|
|
|
- sh: test -n "$ANDROID_KEYSTORE_PASSWORD"
|
|
|
|
|
msg: "ANDROID_KEYSTORE_PASSWORD is not set"
|
2026-05-17 16:43:52 +02:00
|
|
|
cmds:
|
2026-05-18 09:20:05 +02:00
|
|
|
- HASH=$(git rev-parse --short HEAD) && dagger call --progress=plain -q -m ci --source=. deploy-apk --ssh-key env:SSH_PRIVATE_KEY --ssh-user "$SSH_USER" --ssh-host "$SSH_HOST" --commit-hash "$HASH" --keystore-base64 env:ANDROID_KEYSTORE_BASE64 --keystore-password env:ANDROID_KEYSTORE_PASSWORD --build-number "$(git log -1 --format=%ct HEAD)"
|
2026-05-17 16:43:52 +02:00
|
|
|
|
|
|
|
|
publish-website:
|
|
|
|
|
desc: Build and publish website via Dagger
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_PRIVATE_KEY"
|
|
|
|
|
msg: "SSH_PRIVATE_KEY is not set"
|
|
|
|
|
cmds:
|
2026-05-17 22:15:05 +02:00
|
|
|
- dagger call --progress=plain -q -m ci --source=. publish-website --ssh-key env:SSH_PRIVATE_KEY --ssh-user "$SSH_USER" --ssh-host "$SSH_HOST"
|
2026-05-17 16:43:52 +02:00
|
|
|
|
|
|
|
|
check-dagger:
|
2026-05-20 11:46:58 +02:00
|
|
|
desc: Run full check suite via Dagger (with OTEL timing report if python3 is available)
|
2026-05-17 16:43:52 +02:00
|
|
|
cmds:
|
2026-05-20 10:27:57 +02:00
|
|
|
- |
|
2026-05-20 16:38:33 +02:00
|
|
|
DAGGER_OUT=$(mktemp)
|
|
|
|
|
RC_FILE=$(mktemp)
|
2026-05-20 21:00:20 +02:00
|
|
|
_ts() { date -u '+[%H:%M:%S]'; }
|
2026-05-20 18:47:38 +02:00
|
|
|
run_dagger() {
|
|
|
|
|
: > "$DAGGER_OUT"; : > "$RC_FILE"
|
2026-05-20 20:02:44 +02:00
|
|
|
{ timeout --kill-after=10 600 "$@"; echo $? > "$RC_FILE"; } 2>&1 | tee "$DAGGER_OUT"
|
2026-05-20 18:47:38 +02:00
|
|
|
RC=$(cat "$RC_FILE" 2>/dev/null || echo 1)
|
|
|
|
|
if [ "$RC" -eq 124 ] && grep -q "All tests passed" "$DAGGER_OUT"; then
|
2026-05-20 21:00:20 +02:00
|
|
|
echo "$(_ts) dagger: hung in teardown after success; treating as exit 0." >&2
|
2026-05-20 18:47:38 +02:00
|
|
|
RC=0
|
2026-05-20 16:38:33 +02:00
|
|
|
fi
|
|
|
|
|
return "$RC"
|
|
|
|
|
}
|
2026-05-20 18:47:38 +02:00
|
|
|
retry_dagger() {
|
|
|
|
|
for attempt in 1 2 3; do
|
|
|
|
|
run_dagger "$@" && return 0
|
|
|
|
|
RC=$?
|
|
|
|
|
if [ "$attempt" -lt 3 ] && grep -qE "connection reset|context canceled|connection refused" "$DAGGER_OUT"; then
|
2026-05-20 21:00:20 +02:00
|
|
|
echo "$(_ts) dagger: network error on attempt $attempt/3, retrying..." >&2
|
2026-05-20 18:47:38 +02:00
|
|
|
else
|
|
|
|
|
return "$RC"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
}
|
2026-05-20 11:30:08 +02:00
|
|
|
if ! command -v python3 >/dev/null 2>&1; then
|
2026-05-20 18:47:38 +02:00
|
|
|
retry_dagger dagger call --progress=plain -q -m ci --source=. check
|
|
|
|
|
RC=$?
|
2026-05-20 16:38:33 +02:00
|
|
|
rm -f "$DAGGER_OUT" "$RC_FILE"
|
|
|
|
|
exit $RC
|
2026-05-20 10:27:57 +02:00
|
|
|
fi
|
2026-05-20 11:46:58 +02:00
|
|
|
PORTFILE=$(mktemp)
|
2026-05-21 15:18:34 +02:00
|
|
|
python3 ci/otel-receiver.py --port-file="$PORTFILE" &
|
2026-05-20 11:46:58 +02:00
|
|
|
RECV_PID=$!
|
|
|
|
|
cleanup() {
|
2026-05-21 15:18:34 +02:00
|
|
|
kill -9 "$RECV_PID" 2>/dev/null || true
|
2026-05-20 16:38:33 +02:00
|
|
|
rm -f "$PORTFILE" "$DAGGER_OUT" "$RC_FILE"
|
2026-05-20 11:46:58 +02:00
|
|
|
}
|
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
until [ -s "$PORTFILE" ]; do sleep 0.05; done
|
|
|
|
|
PORT=$(cat "$PORTFILE")
|
2026-05-20 21:00:20 +02:00
|
|
|
retry_dagger env \
|
|
|
|
|
OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:$PORT" \
|
|
|
|
|
OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" \
|
2026-05-20 18:47:38 +02:00
|
|
|
dagger call --progress=plain -q -m ci --source=. check
|
2026-05-20 21:00:20 +02:00
|
|
|
RC=$?
|
2026-05-21 15:18:34 +02:00
|
|
|
curl -sf "http://127.0.0.1:$PORT/shutdown" >/dev/null 2>&1 || true
|
|
|
|
|
wait "$RECV_PID" 2>/dev/null || true
|
2026-05-20 21:00:20 +02:00
|
|
|
exit $RC
|
2026-04-25 17:55:52 +02:00
|
|
|
|
2026-04-25 06:13:38 +02:00
|
|
|
integration-android:
|
|
|
|
|
desc: UI integration tests on a connected Android emulator (Stalwart on host, emulator reaches it via 10.0.2.2)
|
2026-05-06 09:58:42 +02:00
|
|
|
deps: [_preflight, _android-sdk-check, _android-avd-setup]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- integration_test/app_e2e_test.dart
|
|
|
|
|
- android/**/*
|
|
|
|
|
generates:
|
|
|
|
|
- build/integration-android.done
|
2026-04-25 06:13:38 +02:00
|
|
|
cmds:
|
|
|
|
|
- stalwart-dev/integration_android_test.sh
|
2026-05-07 22:07:54 +02:00
|
|
|
- touch build/integration-android.done
|
2026-04-25 06:13:38 +02:00
|
|
|
|
2026-04-17 10:05:31 +02:00
|
|
|
build-linux:
|
|
|
|
|
desc: Build the Linux desktop app (debug)
|
2026-05-10 11:23:39 +02:00
|
|
|
deps: [_preflight, _linux-deps-check, _codegen, generate-changelog]
|
2026-05-07 22:07:54 +02:00
|
|
|
method: timestamp
|
|
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- linux/**/*
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
generates:
|
|
|
|
|
- build/linux/x64/debug/bundle/sharedinbox
|
2026-04-17 10:05:31 +02:00
|
|
|
cmds:
|
2026-04-25 07:07:05 +02:00
|
|
|
- scripts/silent_on_success.sh fvm flutter build linux --debug --no-pub
|
2026-04-17 10:05:31 +02:00
|
|
|
|
2026-05-08 12:04:42 +02:00
|
|
|
build-linux-release:
|
|
|
|
|
desc: Build the Linux desktop app (release)
|
2026-05-10 11:23:39 +02:00
|
|
|
deps: [_preflight, _linux-deps-check, _codegen, generate-changelog]
|
2026-05-08 12:04:42 +02:00
|
|
|
method: timestamp
|
|
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- linux/**/*
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
generates:
|
|
|
|
|
- build/linux/x64/release/bundle/sharedinbox
|
|
|
|
|
cmds:
|
2026-05-14 23:46:29 +02:00
|
|
|
- scripts/silent_on_success.sh fvm flutter build linux --release --no-pub --dart-define=GIT_HASH=$(git rev-parse --short HEAD)
|
|
|
|
|
|
|
|
|
|
deploy-linux-to-server:
|
|
|
|
|
desc: Package and deploy the Linux release bundle to the server, update latest.json
|
|
|
|
|
deps: [build-linux-release]
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_USER"
|
|
|
|
|
msg: "SSH_USER is not set"
|
|
|
|
|
- sh: test -n "$SSH_HOST"
|
|
|
|
|
msg: "SSH_HOST is not set"
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
HASH=$(git rev-parse --short HEAD)
|
|
|
|
|
DATE_PATH=$(date -u +%Y/%m/%d)
|
|
|
|
|
REMOTE_DIR="public_html/builds/$DATE_PATH"
|
|
|
|
|
TARBALL="sharedinbox-linux-amd64-$HASH.tar.gz"
|
|
|
|
|
tar -czf /tmp/$TARBALL -C build/linux/x64/release bundle
|
|
|
|
|
ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "mkdir -p $REMOTE_DIR"
|
|
|
|
|
scp -o StrictHostKeyChecking=no /tmp/$TARBALL "$SSH_USER@$SSH_HOST:$REMOTE_DIR/$TARBALL"
|
|
|
|
|
DOWNLOAD_URL="https://sharedinbox.de/builds/$DATE_PATH/$TARBALL"
|
2026-05-14 23:56:01 +02:00
|
|
|
# Merge with any existing latest.json so we don't overwrite the windows key
|
|
|
|
|
EXISTING=$(ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "cat public_html/latest.json 2>/dev/null || echo '{}'")
|
|
|
|
|
WINDOWS_URL=$(echo "$EXISTING" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('windows',''))" 2>/dev/null || true)
|
|
|
|
|
if [ -n "$WINDOWS_URL" ]; then
|
|
|
|
|
echo "{\"version\":\"$HASH\",\"linux\":\"$DOWNLOAD_URL\",\"windows\":\"$WINDOWS_URL\"}" | \
|
|
|
|
|
ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "cat > public_html/latest.json"
|
|
|
|
|
else
|
|
|
|
|
echo "{\"version\":\"$HASH\",\"linux\":\"$DOWNLOAD_URL\"}" | \
|
|
|
|
|
ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "cat > public_html/latest.json"
|
|
|
|
|
fi
|
2026-05-14 23:46:29 +02:00
|
|
|
echo "Uploaded $TARBALL and updated latest.json"
|
2026-05-08 12:04:42 +02:00
|
|
|
|
2026-05-14 23:56:01 +02:00
|
|
|
build-windows-release:
|
|
|
|
|
desc: Build the Windows desktop app (release) — must run on a Windows machine with MSVC
|
|
|
|
|
deps: [_pub-get, generate-changelog]
|
|
|
|
|
method: timestamp
|
|
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- windows/**/*
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
generates:
|
|
|
|
|
- build/windows/x64/runner/Release/sharedinbox.exe
|
|
|
|
|
cmds:
|
|
|
|
|
- fvm flutter build windows --release --no-pub --dart-define=GIT_HASH=$(git rev-parse --short HEAD)
|
|
|
|
|
|
|
|
|
|
deploy-windows-to-server:
|
|
|
|
|
desc: Package and deploy the Windows release bundle to the server, update latest.json
|
|
|
|
|
deps: [build-windows-release]
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_USER"
|
|
|
|
|
msg: "SSH_USER is not set"
|
|
|
|
|
- sh: test -n "$SSH_HOST"
|
|
|
|
|
msg: "SSH_HOST is not set"
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
HASH=$(git rev-parse --short HEAD)
|
|
|
|
|
DATE_PATH=$(date -u +%Y/%m/%d)
|
|
|
|
|
REMOTE_DIR="public_html/builds/$DATE_PATH"
|
|
|
|
|
ZIPFILE="sharedinbox-windows-x64-$HASH.zip"
|
|
|
|
|
cd build/windows/x64/runner && zip -r /tmp/$ZIPFILE Release/ && cd -
|
|
|
|
|
ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "mkdir -p $REMOTE_DIR"
|
|
|
|
|
scp -o StrictHostKeyChecking=no /tmp/$ZIPFILE "$SSH_USER@$SSH_HOST:$REMOTE_DIR/$ZIPFILE"
|
|
|
|
|
DOWNLOAD_URL="https://sharedinbox.de/builds/$DATE_PATH/$ZIPFILE"
|
|
|
|
|
EXISTING=$(ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "cat public_html/latest.json 2>/dev/null || echo '{}'")
|
|
|
|
|
LINUX_URL=$(echo "$EXISTING" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('linux',''))" 2>/dev/null || true)
|
|
|
|
|
if [ -n "$LINUX_URL" ]; then
|
|
|
|
|
echo "{\"version\":\"$HASH\",\"linux\":\"$LINUX_URL\",\"windows\":\"$DOWNLOAD_URL\"}" | \
|
|
|
|
|
ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "cat > public_html/latest.json"
|
|
|
|
|
else
|
|
|
|
|
echo "{\"version\":\"$HASH\",\"windows\":\"$DOWNLOAD_URL\"}" | \
|
|
|
|
|
ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "cat > public_html/latest.json"
|
|
|
|
|
fi
|
|
|
|
|
echo "Uploaded $ZIPFILE and updated latest.json"
|
|
|
|
|
|
2026-05-10 11:24:31 +02:00
|
|
|
|
2026-05-06 09:58:42 +02:00
|
|
|
_android-avd-setup:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
|
|
|
|
status:
|
|
|
|
|
- test -f "${ANDROID_HOME:-$HOME/Android/Sdk}/emulator/emulator"
|
|
|
|
|
- test -d "$HOME/.android/avd/sharedinbox_test.avd"
|
|
|
|
|
cmds:
|
|
|
|
|
- cmd: |
|
|
|
|
|
SDK="${ANDROID_HOME:-$HOME/Android/Sdk}"
|
|
|
|
|
SDKMANAGER="$SDK/cmdline-tools/latest/bin/sdkmanager"
|
|
|
|
|
AVDMANAGER="$SDK/cmdline-tools/latest/bin/avdmanager"
|
|
|
|
|
yes | "$SDKMANAGER" --licenses >/dev/null 2>&1 || true
|
|
|
|
|
"$SDKMANAGER" "emulator" "system-images;android-34;google_apis;x86_64"
|
|
|
|
|
echo no | "$AVDMANAGER" create avd \
|
|
|
|
|
--name sharedinbox_test \
|
|
|
|
|
--package "system-images;android-34;google_apis;x86_64" \
|
|
|
|
|
--device pixel_4 \
|
|
|
|
|
--force
|
|
|
|
|
|
2026-04-19 15:30:42 +02:00
|
|
|
_android-sdk-check:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -d "${ANDROID_HOME:-$HOME/Android/Sdk}"
|
|
|
|
|
msg: |
|
|
|
|
|
Android SDK not found. Install it with:
|
|
|
|
|
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/cmdtools.zip
|
|
|
|
|
mkdir -p ~/Android/Sdk/cmdline-tools
|
|
|
|
|
unzip /tmp/cmdtools.zip -d ~/Android/Sdk/cmdline-tools
|
|
|
|
|
mv ~/Android/Sdk/cmdline-tools/cmdline-tools ~/Android/Sdk/cmdline-tools/latest
|
|
|
|
|
~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager "platform-tools" "build-tools;34.0.0" "platforms;android-34"
|
|
|
|
|
- sh: ls "${ANDROID_HOME:-$HOME/Android/Sdk}/platforms/" 2>/dev/null | grep -qE '^android-([3-9][4-9]|[4-9][0-9]|[1-9][0-9]{2,})$'
|
|
|
|
|
msg: |
|
|
|
|
|
Android platform 34 or higher not found. Install it with:
|
|
|
|
|
${ANDROID_HOME:-$HOME/Android/Sdk}/cmdline-tools/latest/bin/sdkmanager "build-tools;34.0.0" "platforms;android-34"
|
|
|
|
|
|
2026-04-16 09:43:24 +02:00
|
|
|
build-android:
|
2026-05-06 20:47:27 +02:00
|
|
|
desc: Build a release APK
|
2026-05-10 11:23:39 +02:00
|
|
|
deps: [_preflight, _android-sdk-check, _pub-get, generate-changelog]
|
2026-05-07 22:07:54 +02:00
|
|
|
method: timestamp
|
|
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- android/**/*
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
generates:
|
|
|
|
|
- build/app/outputs/flutter-apk/app-release.apk
|
2026-04-19 15:30:42 +02:00
|
|
|
cmds:
|
2026-05-16 08:03:13 +02:00
|
|
|
- ANDROID_HOME=${ANDROID_HOME:-$HOME/Android/Sdk} fvm flutter build apk --release --no-pub --dart-define=GIT_HASH=$(git rev-parse --short HEAD) | grep -Ev "was tree-shaken|Tree-shaking can be disabled"
|
2026-04-19 15:30:42 +02:00
|
|
|
|
2026-05-13 17:13:38 +02:00
|
|
|
deploy-android-bundle:
|
2026-05-18 08:37:18 +02:00
|
|
|
desc: Build release AAB and upload to Play Store internal track (local/fvm)
|
|
|
|
|
deps: [build-android-bundle-local]
|
2026-05-13 17:13:38 +02:00
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$PLAY_STORE_CONFIG_JSON"
|
|
|
|
|
msg: "PLAY_STORE_CONFIG_JSON is not set"
|
|
|
|
|
cmds:
|
|
|
|
|
- python3 scripts/deploy_playstore.py
|
|
|
|
|
|
2026-05-18 08:37:18 +02:00
|
|
|
build-android-bundle-local:
|
|
|
|
|
desc: Build a release App Bundle (AAB) locally via fvm (not Dagger)
|
2026-05-13 18:57:19 +02:00
|
|
|
deps: [_preflight, _android-sdk-check, _codegen, generate-changelog]
|
2026-05-12 08:15:47 +02:00
|
|
|
method: timestamp
|
|
|
|
|
sources:
|
|
|
|
|
- lib/**/*.dart
|
|
|
|
|
- android/**/*
|
|
|
|
|
- pubspec.yaml
|
|
|
|
|
generates:
|
|
|
|
|
- build/app/outputs/bundle/release/app-release.aab
|
|
|
|
|
cmds:
|
2026-05-16 08:03:13 +02:00
|
|
|
- ANDROID_HOME=${ANDROID_HOME:-$HOME/Android/Sdk} fvm flutter build appbundle --release --no-pub --build-number $(date +%s) --build-name $(date +%y%m%d-%H%M) --dart-define=GIT_HASH=$(git rev-parse --short HEAD) | grep -Ev "was tree-shaken|Tree-shaking can be disabled"
|
2026-05-12 08:15:47 +02:00
|
|
|
|
2026-04-19 15:30:42 +02:00
|
|
|
deploy-android:
|
|
|
|
|
desc: Build release APK and upload via scp to $ANDROID_APK_SCP_USER@$ANDROID_APK_SCP_HOST:$ANDROID_APK_SCP_PATH
|
2026-04-26 22:31:25 +02:00
|
|
|
deps: [check, build-android]
|
2026-05-07 22:07:54 +02:00
|
|
|
sources:
|
|
|
|
|
- build/app/outputs/flutter-apk/app-release.apk
|
|
|
|
|
generates:
|
|
|
|
|
- build/deploy-android.done
|
2026-04-19 15:30:42 +02:00
|
|
|
dotenv: [".env"]
|
2026-05-09 13:25:59 +02:00
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$ANDROID_APK_SCP_HOST"
|
|
|
|
|
msg: "ANDROID_APK_SCP_HOST is not set in .env"
|
|
|
|
|
- sh: test -n "$ANDROID_APK_SCP_USER"
|
|
|
|
|
msg: "ANDROID_APK_SCP_USER is not set in .env"
|
|
|
|
|
- sh: test -n "$ANDROID_APK_SCP_PATH"
|
|
|
|
|
msg: "ANDROID_APK_SCP_PATH is not set in .env"
|
2026-04-16 09:43:24 +02:00
|
|
|
cmds:
|
2026-04-26 22:31:25 +02:00
|
|
|
# integration-android runs after check (not in parallel) so the two E2E
|
|
|
|
|
# test suites don't compete for CPU and slow the Android emulator.
|
|
|
|
|
- task: integration-android
|
2026-04-19 15:30:42 +02:00
|
|
|
- scripts/deploy_android.sh
|
2026-05-07 22:07:54 +02:00
|
|
|
- touch build/deploy-android.done
|
|
|
|
|
|
2026-04-16 09:43:24 +02:00
|
|
|
|
2026-04-16 07:40:34 +02:00
|
|
|
run:
|
|
|
|
|
desc: Run the app on Linux desktop
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight, _linux-deps-check, _pub-get]
|
2026-04-16 07:40:34 +02:00
|
|
|
cmds:
|
2026-04-17 22:20:10 +02:00
|
|
|
- fvm flutter run -d linux --no-pub
|
2026-04-16 07:40:34 +02:00
|
|
|
|
2026-04-26 21:22:38 +02:00
|
|
|
run-android:
|
|
|
|
|
desc: Run the app on a connected Android emulator (boots sharedinbox_test AVD if needed)
|
2026-05-06 09:58:42 +02:00
|
|
|
deps: [_preflight, _android-sdk-check, _android-avd-setup, _pub-get]
|
2026-04-26 21:22:38 +02:00
|
|
|
cmds:
|
|
|
|
|
- stalwart-dev/run_android.sh
|
|
|
|
|
|
2026-04-21 08:27:16 +02:00
|
|
|
coverage:
|
|
|
|
|
desc: Coverage gate — run after test (and optionally integration) have written lcov.info
|
2026-04-25 07:12:56 +02:00
|
|
|
deps: [_preflight]
|
2026-04-21 08:27:16 +02:00
|
|
|
cmds:
|
|
|
|
|
- fvm dart run scripts/check_coverage.dart
|
|
|
|
|
|
2026-05-14 05:29:41 +02:00
|
|
|
check-coverage:
|
|
|
|
|
desc: Run unit+widget tests with coverage, then fail if the gate is not met
|
|
|
|
|
deps: [test]
|
|
|
|
|
cmds:
|
|
|
|
|
- task: coverage
|
|
|
|
|
|
2026-05-12 09:10:21 +02:00
|
|
|
website-dev:
|
|
|
|
|
desc: Run Hugo development server
|
|
|
|
|
cmds:
|
|
|
|
|
- fvm flutter pub global run # Just a placeholder if nix shell hook isn't active
|
|
|
|
|
- nix develop --command hugo server --source website -D
|
|
|
|
|
|
|
|
|
|
website-build:
|
2026-05-13 09:32:46 +02:00
|
|
|
desc: Build the static website (embeds current git hash via HUGO_PARAMS_GITVERSION)
|
|
|
|
|
env:
|
|
|
|
|
HUGO_PARAMS_GITVERSION:
|
|
|
|
|
sh: git rev-parse --short HEAD
|
2026-05-12 09:10:21 +02:00
|
|
|
cmds:
|
2026-05-13 09:42:06 +02:00
|
|
|
- hugo --source website --minify
|
2026-05-12 09:10:21 +02:00
|
|
|
|
2026-05-13 09:32:46 +02:00
|
|
|
website-verify:
|
|
|
|
|
desc: Check that the deployed site serves the current git version
|
|
|
|
|
cmds:
|
|
|
|
|
- scripts/website-verify.sh
|
|
|
|
|
|
2026-05-14 21:46:56 +02:00
|
|
|
deploy-apk-to-server:
|
|
|
|
|
desc: SCP the release APK to the server at public_html/builds/YYYY/MM/DD/
|
|
|
|
|
deps: [build-android]
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_USER"
|
|
|
|
|
msg: "SSH_USER is not set"
|
|
|
|
|
- sh: test -n "$SSH_HOST"
|
|
|
|
|
msg: "SSH_HOST is not set"
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
HASH=$(git rev-parse --short HEAD)
|
|
|
|
|
DATE_PATH=$(date -u +%Y/%m/%d)
|
|
|
|
|
REMOTE_DIR="public_html/builds/$DATE_PATH"
|
|
|
|
|
APK_NAME="sharedinbox-mua-$HASH.apk"
|
|
|
|
|
ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "mkdir -p $REMOTE_DIR"
|
|
|
|
|
scp -o StrictHostKeyChecking=no \
|
|
|
|
|
build/app/outputs/flutter-apk/app-release.apk \
|
|
|
|
|
"$SSH_USER@$SSH_HOST:$REMOTE_DIR/$APK_NAME"
|
|
|
|
|
echo "Uploaded $APK_NAME to $REMOTE_DIR"
|
|
|
|
|
|
|
|
|
|
generate-build-history:
|
2026-05-15 19:08:55 +02:00
|
|
|
desc: Generate Hugo build-history pages from Linux and Android builds on the server
|
2026-05-14 21:46:56 +02:00
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_USER"
|
|
|
|
|
msg: "SSH_USER is not set"
|
|
|
|
|
- sh: test -n "$SSH_HOST"
|
|
|
|
|
msg: "SSH_HOST is not set"
|
|
|
|
|
cmds:
|
|
|
|
|
- python3 scripts/generate_build_history.py
|
|
|
|
|
|
2026-05-15 19:08:55 +02:00
|
|
|
website-publish:
|
|
|
|
|
desc: Generate build history, build Hugo site, and rsync to server (requires SSH_USER + SSH_HOST)
|
|
|
|
|
preconditions:
|
|
|
|
|
- sh: test -n "$SSH_USER"
|
|
|
|
|
msg: "SSH_USER is not set"
|
|
|
|
|
- sh: test -n "$SSH_HOST"
|
|
|
|
|
msg: "SSH_HOST is not set"
|
|
|
|
|
cmds:
|
|
|
|
|
- task: generate-build-history
|
|
|
|
|
- task: website-deploy
|
|
|
|
|
|
2026-05-12 09:10:21 +02:00
|
|
|
website-deploy:
|
|
|
|
|
desc: Deploy the website via rsync to public_html
|
|
|
|
|
deps: [website-build]
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
rsync -avz --delete \
|
2026-05-14 21:46:56 +02:00
|
|
|
--exclude='*.apk' \
|
2026-05-15 19:08:55 +02:00
|
|
|
--exclude='*.tar.gz' \
|
2026-05-12 09:10:21 +02:00
|
|
|
-e "ssh -o StrictHostKeyChecking=no" \
|
|
|
|
|
website/public/ \
|
|
|
|
|
${SSH_USER}@${SSH_HOST}:public_html/
|
|
|
|
|
|
2026-04-18 16:16:35 +02:00
|
|
|
check-fast:
|
2026-05-14 05:29:41 +02:00
|
|
|
desc: Pre-commit checks — analyze + unit+widget tests + coverage gate (no build, no integration)
|
2026-05-15 10:19:28 +02:00
|
|
|
deps: [analyze, check-coverage, check-hygiene, check-layers, check-mocks]
|
2026-05-14 11:41:34 +02:00
|
|
|
|
|
|
|
|
check-layers:
|
|
|
|
|
desc: Enforce architecture — ui/ must not import data/ (only core/ interfaces allowed)
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
VIOLATIONS=$(grep -rn "package:sharedinbox/data/" lib/ui/ 2>/dev/null || true)
|
|
|
|
|
if [ -n "$VIOLATIONS" ]; then
|
|
|
|
|
echo "ERROR: UI layer imports data layer (only core/ interfaces are allowed from ui/):"
|
|
|
|
|
echo "$VIOLATIONS"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2026-05-10 10:48:18 +02:00
|
|
|
|
|
|
|
|
check-hygiene:
|
|
|
|
|
desc: Verify that no forbidden files (like home dir config) are tracked
|
|
|
|
|
cmds:
|
|
|
|
|
- |
|
|
|
|
|
FORBIDDEN=".ssh .bashrc .config .local .cache .gitconfig .android Android .gradle .pub-cache .dartServer .flutter .dart-cli-completion .atuin .bash_logout .profile .zcompdump .zshrc snap .emulator_console_auth_token .lesshst .metadata .tmux.conf"
|
|
|
|
|
TRACKED=$(git ls-files $FORBIDDEN 2>/dev/null)
|
|
|
|
|
if [ -n "$TRACKED" ]; then
|
|
|
|
|
echo "ERROR: The following forbidden files are tracked in git:"
|
|
|
|
|
echo "$TRACKED"
|
|
|
|
|
echo "Please remove them with 'git rm --cached <file>'"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "Hygiene check passed."
|
2026-04-18 16:16:35 +02:00
|
|
|
|
2026-04-27 07:13:13 +02:00
|
|
|
_integrations:
|
|
|
|
|
internal: true
|
|
|
|
|
run: once
|
2026-05-06 21:54:41 +02:00
|
|
|
cmds:
|
2026-05-17 08:47:15 +02:00
|
|
|
- task: test-backend
|
2026-05-06 21:54:41 +02:00
|
|
|
- task: integration-ui
|
2026-04-27 07:13:13 +02:00
|
|
|
|
2026-05-13 06:05:55 +02:00
|
|
|
ci-logs:
|
|
|
|
|
desc: "Fetch latest CI job logs from Codeberg. Usage: task ci-logs [RUN=8] [JOB=0]"
|
|
|
|
|
cmds:
|
|
|
|
|
- scripts/ci_logs.sh "{{.RUN}}" "{{.JOB}}"
|
|
|
|
|
|
2026-04-16 07:40:34 +02:00
|
|
|
check:
|
2026-04-21 08:27:16 +02:00
|
|
|
desc: Full check suite — unit tests first, then integration (merges coverage), then gate
|
2026-05-12 21:55:06 +02:00
|
|
|
deps: [analyze, build-linux, test]
|
2026-04-21 08:27:16 +02:00
|
|
|
cmds:
|
2026-04-27 07:13:13 +02:00
|
|
|
- task: _integrations
|
2026-04-21 08:27:16 +02:00
|
|
|
- task: coverage
|