# Release version 0.15.10 #115
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| RUST_BACKTRACE: short | |
| # Refuse to silently regenerate snapshots in CI — any drift must be | |
| # accepted locally with `cargo insta review` and committed. | |
| INSTA_UPDATE: "no" | |
| concurrency: | |
| group: test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| frontend: | |
| name: Frontend (lint + vitest + build) | |
| # Frontend tests are OS-independent (jsdom + pure TS), keep on Linux | |
| # to save CI minutes. | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm eslint . | |
| - name: Unit tests (vitest) | |
| run: pnpm test | |
| - name: Static export build | |
| run: pnpm build | |
| rust: | |
| name: Rust ${{ matrix.mode }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, macos-latest, windows-latest] | |
| mode: [desktop, server] | |
| include: | |
| - mode: desktop | |
| # `test-utils` exposes test scaffolding (AppState::new_for_test, | |
| # EventEmitter::test_web_only, ConnectionManager::insert_test_connection, | |
| # parser `with_base_dir`, `db::test_helpers`) for integration tests | |
| # under `tests/`. Without the flag those items are physically | |
| # uncompiled, so integration tests would fail to link. | |
| cargo_args: "--features test-utils" | |
| # Desktop clippy must lint integration tests too, so it picks up | |
| # `--all-targets`. test-utils is already on, so tests compile. | |
| clippy_args: "--all-targets --features test-utils" | |
| - mode: server | |
| # Server build is feature-gated off the Tauri runtime; no | |
| # need for webkit/appindicator system libs. `--lib` skips | |
| # integration tests for `cargo test`, so `test-utils` is not | |
| # required here. | |
| cargo_args: "--no-default-features --bin codeg-server --lib" | |
| # Server clippy intentionally skips `--all-targets`: integration | |
| # tests are already linted in the desktop cells, and pulling | |
| # them in here would force `test-utils` (a test-only feature) | |
| # into the server build matrix. Lint scope here is lib + the | |
| # codeg-server binary, which is exactly the cfg-gated surface | |
| # that this cell exists to verify. | |
| clippy_args: "--no-default-features --bin codeg-server --lib" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "./src-tauri -> target" | |
| shared-key: test-${{ matrix.os }}-${{ matrix.mode }} | |
| - name: Install Linux desktop dependencies | |
| # Only the Linux desktop build needs webkit/appindicator. Windows | |
| # ships WebView2 with the OS; macOS uses WKWebView from the SDK. | |
| if: matrix.os == 'ubuntu-22.04' && matrix.mode == 'desktop' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev | |
| - name: Prepare Tauri frontendDist placeholder | |
| # Tauri's build script validates `frontendDist` and bundled resource | |
| # paths during Rust compilation. The frontend job owns the real static | |
| # export; Rust desktop cells only need the path to exist for tests. | |
| if: matrix.mode == 'desktop' | |
| shell: bash | |
| run: | | |
| mkdir -p out | |
| printf '<!doctype html><html><body></body></html>\n' > out/index.html | |
| - name: cargo test | |
| # Windows desktop test binaries link the Tauri runtime and can fail at | |
| # process load on GitHub-hosted runners before Rust tests start. Keep | |
| # compile coverage here; Linux/macOS desktop and Windows server cells | |
| # run the executable test suites. | |
| working-directory: src-tauri | |
| run: cargo test ${{ matrix.cargo_args }} ${{ (matrix.os == 'windows-latest' && matrix.mode == 'desktop') && '--no-run' || '' }} | |
| - name: cargo clippy | |
| # Clippy on each (os, mode) cell — desktop covers tauri-only code | |
| # paths plus integration tests, server covers cfg-gated server-only | |
| # code. Treat warnings as errors now that the 8 pre-existing | |
| # advisories are cleared. | |
| working-directory: src-tauri | |
| run: cargo clippy ${{ matrix.clippy_args }} -- -D warnings | |
| - name: Web handlers must route through commands/*_core | |
| # Lock in the dedup from Phase 8: web/handlers/{folders,conversations}.rs | |
| # must not call DB services directly. They have to delegate to a | |
| # `_core` function in `commands/*.rs` so the Tauri command and HTTP | |
| # entrypoints share one implementation. Run on Linux only — pure | |
| # text check, no per-OS variance. | |
| if: matrix.os == 'ubuntu-22.04' && matrix.mode == 'desktop' | |
| working-directory: src-tauri | |
| run: | | |
| if grep -nE 'folder_service::|conversation_service::|tab_service::|import_service::' \ | |
| src/web/handlers/folders.rs \ | |
| src/web/handlers/conversations.rs; then | |
| echo "::error::Web handlers must call commands/*_core, not services directly." | |
| exit 1 | |
| fi |