dev-ci 0.9.2

Calibrated GitHub Actions workflow generator for Rust crates. Library API + CLI binary. Byte-deterministic YAML output. Part of the dev-* verification collection.
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v5
      - name: Check out sibling crates (path deps)
        run: git clone --depth 1 https://github.com/jamesgober/dev-report.git ../dev-report
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2

      - name: Build (default features)
        run: cargo build --verbose
      - name: Test (default features)
        run: cargo test --verbose

      - name: Build (no default features)
        run: cargo build --no-default-features --verbose

      - name: Build (all features)
        run: cargo build --all-features --verbose
      - name: Test (all features)
        run: cargo test --all-features --verbose

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: Check out sibling crates (path deps)
        run: git clone --depth 1 https://github.com/jamesgober/dev-report.git ../dev-report
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
      - name: Clippy (all features)
        run: cargo clippy --all-targets --all-features -- -D warnings
      - name: Clippy (no default features)
        run: cargo clippy --all-targets --no-default-features -- -D warnings

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - run: cargo fmt --all -- --check

  docs:
    name: Doc build
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: "-D warnings"
    steps:
      - uses: actions/checkout@v5
      - name: Check out sibling crates (path deps)
        run: git clone --depth 1 https://github.com/jamesgober/dev-report.git ../dev-report
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo doc --all-features --no-deps

  msrv:
    name: MSRV (Rust 1.85)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: Check out sibling crates (path deps)
        run: git clone --depth 1 https://github.com/jamesgober/dev-report.git ../dev-report
      - uses: dtolnay/rust-toolchain@1.85
      - uses: Swatinem/rust-cache@v2
      - run: cargo build --all-features --verbose

  # Smoke-check the dev-ci CLI binary itself. Verifies the binary
  # compiles, runs, and emits well-formed YAML when invoked with
  # representative arguments.
  cli:
    name: CLI smoke
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: Check out sibling crates (path deps)
        run: git clone --depth 1 https://github.com/jamesgober/dev-report.git ../dev-report
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Build CLI
        run: cargo build --release --bin dev-ci
      - name: Generate sample workflow to stdout
        run: |
          ./target/release/dev-ci generate --print \
            --with clippy,fmt,docs,msrv \
            --msrv 1.85 \
            --matrix ubuntu-latest,macos-latest \
            --path-dep dev-report=https://github.com/jamesgober/dev-report.git \
            | tee /tmp/dev-ci-sample.yml
      - name: Sanity-check the emitted YAML
        run: |
          grep -q "name: CI"                       /tmp/dev-ci-sample.yml
          grep -q "actions/checkout@v5"            /tmp/dev-ci-sample.yml
          grep -q "MSRV (Rust 1.85)"               /tmp/dev-ci-sample.yml
          grep -q "Swatinem/rust-cache@v2"         /tmp/dev-ci-sample.yml
          grep -q "git clone --depth 1 https://"   /tmp/dev-ci-sample.yml