fix(m8): handle-confined restore writes + FTS5 prefix routing + no-or… #74
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| # sqlx compile-time-checked queries (M1+). CI does not have a live DB; | |
| # checked queries resolve against the committed `.sqlx/` cache instead. | |
| # Regenerated locally with `cargo sqlx prepare --workspace`. | |
| SQLX_OFFLINE: "true" | |
| jobs: | |
| rust-fmt: | |
| name: rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: { components: rustfmt } | |
| - run: cargo fmt --all -- --check | |
| rust-test: | |
| name: cargo test + clippy (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: { components: clippy } | |
| - name: Install Linux Tauri deps | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libxdo-dev libssl-dev \ | |
| libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev javascriptcoregtk-4.1 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: cargo build (compile-only) | |
| run: cargo build --workspace --all-targets | |
| - name: cargo clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: cargo test | |
| run: cargo test --workspace | |
| ui-build: | |
| name: ui build + lint + unit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: { version: 10 } | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| cache-dependency-path: ui/pnpm-lock.yaml | |
| - name: pnpm install | |
| working-directory: ui | |
| run: pnpm install --frozen-lockfile | |
| - name: lint | |
| working-directory: ui | |
| run: pnpm lint | |
| - name: test:unit | |
| working-directory: ui | |
| run: pnpm test:unit | |
| - name: build | |
| working-directory: ui | |
| run: pnpm build | |
| tauri-compile: | |
| name: tauri compile (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: pnpm/action-setup@v4 | |
| with: { version: 10 } | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| cache-dependency-path: ui/pnpm-lock.yaml | |
| - name: Install Linux Tauri deps | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libxdo-dev libssl-dev \ | |
| libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev javascriptcoregtk-4.1 | |
| # src-tauri is a member of the ROOT cargo workspace, so `cargo tauri build` | |
| # writes all compile artifacts to the root `target/`, NOT `src-tauri/target`. | |
| # The old `workspaces: src-tauri` cached the wrong (near-empty, ~128MB) dir, so | |
| # every run was a cold ~7min rebuild. Default workspace (`.` -> ./target) caches | |
| # the real artifacts. prefix-key bumped to v1 to force past the stale v0 fossil | |
| # cache (a full key-match would restore it and skip the corrected save). | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v1-rust" | |
| - name: pnpm install | |
| working-directory: ui | |
| run: pnpm install --frozen-lockfile | |
| - name: ui build | |
| working-directory: ui | |
| run: pnpm build | |
| - name: Install tauri-cli | |
| run: cargo install tauri-cli --version "^2" --locked | |
| - name: cargo tauri build --debug --no-bundle | |
| run: cargo tauri build --debug --no-bundle | |
| cargo-deny: | |
| name: cargo deny | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| command: check | |
| arguments: --all-features |