nornir 0.4.34

Companion to cargo: dependency tracking, release gating, deploy, benchmarks, and documentation assembly. Project-agnostic.
name: CI

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  build-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable

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

      # nornir is a single crate with feature gates. CI builds the default
      # (`server`) feature set — `--features cli` additionally pulls the typst
      # docs-export stack, exercised separately by the docs workflow.
      - name: Build
        run: cargo build --workspace --verbose

      - name: Test
        run: cargo test --workspace --verbose

  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      # Informational: the crate is not fully fmt/clippy-clean yet, so these do
      # not fail the build (no `-D warnings`).
      - name: Clippy
        run: cargo clippy --workspace --all-targets
        continue-on-error: true

      - name: Rustfmt
        run: cargo fmt --all -- --check
        continue-on-error: true