mirror-log 0.1.9

Append-only event log for personal knowledge management with semantic chunking using SQLite.
Documentation
name: CI

on:
  push:
    branches:
      - main
      - master
  pull_request:

jobs:
  checks:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - name: default
            build_args: --locked
            test_args: --locked
            clippy_args: --all-targets --locked -- -D warnings
          - name: all-features
            build_args: --all-features --locked
            test_args: --all-features --locked
            clippy_args: --all-targets --all-features --locked -- -D warnings

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy,rustfmt

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: ~/.cargo/registry
          key: ${{ runner.os }}-${{ matrix.name }}-registry-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo index
        uses: actions/cache@v4
        with:
          path: ~/.cargo/git
          key: ${{ runner.os }}-${{ matrix.name }}-git-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo build
        uses: actions/cache@v4
        with:
          path: target
          key: ${{ runner.os }}-${{ matrix.name }}-build-${{ hashFiles('**/Cargo.lock') }}

      - name: Check formatting
        run: cargo fmt --all -- --check

      - name: Build
        run: cargo build ${{ matrix.build_args }}

      - name: Run tests
        run: cargo test ${{ matrix.test_args }}

      - name: Clippy
        run: cargo clippy ${{ matrix.clippy_args }}