hird 0.2.2

Cross-harness agent work queue and shared assertion memory, backed by one local SQLite database
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -D warnings

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

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

      - uses: Swatinem/rust-cache@v2

      - name: Formatting
        run: cargo fmt --check

      - name: Lints
        run: cargo clippy --all-targets -- -D warnings

      # Spawns the real binary for the MCP and CLI integration tests, so the
      # binary has to exist before they run.
      - name: Tests
        run: cargo test --all-targets

      # The published site is hand-written HTML, so a renamed section id would
      # otherwise break its own table of contents silently.
      - name: Documentation site links
        run: .github/scripts/check-docs-links.sh

      # The examples are part of the documentation; a broken one misleads.
      - name: Example scripts
        env:
          HIRD_BIN: ${{ github.workspace }}/target/debug/hird
        run: |
          bash -n examples/*.sh examples/lib/*.sh examples/harness/*.sh
          ./examples/manual-dispatch.sh
          ./examples/swarm-plan.sh
          ./examples/dispatch-hook.sh
          ./examples/events.sh

      # install.sh is exercised end to end by tests/install_script.rs, but
      # get.sh downloads from a live release, so a syntax pass and shellcheck
      # are what CI can honestly check it with.
      - name: Installer scripts
        run: |
          bash -n scripts/install.sh
          sh -n scripts/get.sh
          shellcheck scripts/install.sh scripts/get.sh

      # The herdr plugin has no build step, so nothing else would catch a
      # syntax error in it before somebody's pane opens on one. Checked as
      # POSIX sh, which is what the manifest asks herdr to run them with;
      # --source-path lets it follow the `. lib.sh` both entry points do.
      - name: herdr plugin scripts
        run: |
          sh -n herdr-plugin/*.sh
          shellcheck --shell=sh --source-path=SCRIPTDIR \
            herdr-plugin/*.sh .github/scripts/check-herdr-plugin.sh
          .github/scripts/check-herdr-plugin.sh