Refactor/home page #171
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| # Foundation gates for the rewrite branch: the checks below must stay green so | |
| # the architecture, codegen, and safety-critical EEW math can't silently rot. | |
| on: | |
| push: | |
| branches: [rewrite, main] | |
| pull_request: | |
| # One in-flight run per ref; a new push cancels the previous run. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Architecture gate first — pure grep, no toolchain, fails fast. | |
| - name: Layering gate | |
| run: bash tool/check_layering.sh | |
| # Localization gate — bash + python3 (preinstalled), no toolchain either: | |
| # ARB parity + no hardcoded UI strings. See CLAUDE.md → Localization. | |
| - name: Localization gate | |
| run: bash tool/check_l10n.sh | |
| # Prefs gate — SharedPreferences only via the typed Prefs facade. | |
| - name: Prefs gate | |
| run: bash tool/check_prefs.sh | |
| # Lockfile must not embed a machine-local path (pubspec_overrides leak). | |
| - name: pubspec.lock path gate | |
| run: bash tool/check_pubspec_lock.sh | |
| # Flutter/Dart come from mise.toml, so CI uses the exact pinned version | |
| # developers run locally — one source of truth. v4 = Node 24 runtime | |
| # (Node 20 actions are forced onto 24 and emit deprecation warnings). | |
| - name: Install toolchain (mise) | |
| uses: jdx/mise-action@v4 | |
| - name: Install dependencies | |
| run: mise exec -- flutter pub get | |
| - name: Format | |
| run: mise exec -- dart format --set-exit-if-changed lib test | |
| # Committed *.freezed.dart / *.g.dart must match a fresh build — a stale | |
| # generated file (e.g. after editing a model without regenerating) fails | |
| # here instead of shipping. | |
| - name: Codegen is up to date | |
| run: | | |
| mise exec -- dart run build_runner build --delete-conflicting-outputs | |
| git diff --exit-code || { | |
| echo "::error::Working tree dirty after build_runner (stale codegen, or pubspec.lock rewritten — e.g. a path override leaked into the lockfile). Run: dart run build_runner build && flutter pub get (without pubspec_overrides.yaml) and commit." | |
| git --no-pager diff --stat | |
| git --no-pager diff | |
| exit 1 | |
| } | |
| - name: Analyze | |
| run: mise exec -- flutter analyze | |
| # The ETag-cache tests run SQLite on the host via sqflite_common_ffi; | |
| # ubuntu ships libsqlite3.so.0 but not the unversioned symlink its loader | |
| # needs, so install the dev package. | |
| - name: Install SQLite (sqflite_common_ffi host tests) | |
| run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev | |
| - name: Test | |
| run: mise exec -- flutter test |