abalone 1.0.1

A full-screen interactive shell for CLI apps: header, input box with a command menu, status bar, help and settings panels, plus a self-updater and installer
Documentation
# Checks every push to main and every pull request, and every release
# first (release.yml runs it and only publishes when it passes):
#
# - on Windows, macOS and Linux: formatting, clippy with warnings as errors,
#   and the tests, with every feature and with none;
# - the API docs build with no broken links;
# - the pictures in docs/images match what the code draws now;
# - CHANGELOG.md's format, and that the crate packs and builds for crates.io;
# - no crate in Cargo.lock has a security advisory.

name: CI

on:
  push:
    branches: [main]
  pull_request:
  workflow_call:
  workflow_dispatch:

concurrency:
  group: ci-${{ github.ref }}-${{ github.event_name }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -D warnings

jobs:
  check:
    name: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest, ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - name: Format
        run: cargo fmt --check
      - name: Clippy, every feature
        run: cargo clippy --all-features --all-targets --locked
      - name: Clippy, no features
        run: cargo clippy --no-default-features --all-targets --locked
      - name: Test, every feature
        run: cargo test --all-features --locked
      - name: Test, no features
        run: cargo test --no-default-features --locked

  docs:
    name: Docs, pictures, changelog and package
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: API docs
        env:
          RUSTDOCFLAGS: -D warnings
        run: cargo doc --all-features --no-deps --locked
      - name: Pictures are current
        run: |
          cargo test --all-features --locked --test docs_pictures -- --ignored
          git diff --exit-code -- docs/images || {
            echo "::error::docs/images is out of date: run cargo test --all-features --test docs_pictures -- --ignored and commit the pictures"
            exit 1
          }
          test -z "$(git ls-files --others --exclude-standard docs/images)" || {
            echo "::error::new pictures in docs/images aren't committed"
            exit 1
          }
      - name: Changelog
        shell: pwsh
        run: ./templates/release-notes.ps1 -Check -Changelog CHANGELOG.md
      # Packs and builds the crate as crates.io would get it, without publishing.
      - name: Package
        run: cargo publish --dry-run --locked

  audit:
    name: Security advisories
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-audit
      # Fails if a crate in Cargo.lock has a RustSec advisory.
      - name: Audit
        run: cargo audit