lazily 0.12.2

Lazy reactive signals with dependency tracking and cache invalidation
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Rust
    runs-on: ubuntu-latest

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

      - name: Install Rust stable
        run: rustup toolchain install stable --profile minimal --component clippy --component rustfmt

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

      - name: Clippy
        run: cargo +stable clippy --locked --all-targets --all-features -- -D warnings

      - name: Build
        run: cargo +stable build --locked --all-targets --all-features

      - name: Test default features
        run: cargo +stable test --locked

      - name: Test Tokio feature
        run: cargo +stable test --locked --features tokio

      - name: Test distributed feature
        run: cargo +stable test --locked --features "distributed serde"

      - name: Test signaling client feature
        run: cargo +stable test --locked --features signaling-client

      - name: Test async feature
        run: cargo +stable test --locked --features async

      - name: Test WebRTC DataChannel transport + str0m backend (#webrtcbackend)
        run: cargo +stable test --locked --features webrtc-str0m

      - name: Test WebSocket DataChannel backend (#akp3)
        run: cargo +stable test --locked --features websocket

      - name: Test async resolve-loop windows (#k03k)
        run: cargo +stable test --locked --features "async instrumentation" --test async_resolve_loop

      # lazily-spec is the canonical cross-language wire-protocol source. Clone
      # it as a sibling so conformance.rs prefers ../lazily-spec/conformance over
      # its local fixture copies — CI then validates lazily-rs against canonical
      # fixtures and fails on drift (#lzspecconf).
      - name: Fetch canonical lazily-spec conformance fixtures (#lzspecconf)
        run: git clone --depth 1 https://github.com/lazily-hub/lazily-spec.git ../lazily-spec

      - name: Test IPC conformance against canonical spec fixtures (#lzspecconf)
        run: |
          test -d ../lazily-spec/conformance || { echo "::error::../lazily-spec/conformance missing — conformance.rs would silently fall back to local fixtures"; exit 1; }
          cargo +stable test --locked --features ipc --test conformance

      - name: Test loom model
        run: cargo +stable test --locked --features loom --test thread_safe_loom

  signaling:
    name: Signaling Worker (#yxjw)
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: signaling
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Node
        uses: actions/setup-node@v4
        with:
          node-version: "20"

      - name: Install
        run: npm ci

      - name: Typecheck + test
        run: npm run check

  lean:
    name: Lean formal model (#lzleanformal)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout canonical lazily-spec
        uses: actions/checkout@v4
        with:
          repository: lazily-hub/lazily-spec
          path: lazily-spec

      - name: Build Lean formal model
        uses: leanprover/lean-action@v1
        with:
          lake-package-directory: lazily-spec/formal/lean
          auto-config: false
          build: true
          test: false
          lint: false