homeboy 0.63.0

CLI for multi-component deployment and development workflow automation
Documentation
name: CI

on:
  pull_request:
    branches: [main]

permissions:
  contents: write
  pull-requests: write

jobs:
  # ── Rust build + test (native cargo) ──
  # Fast feedback: fmt, clippy, test run directly without installing homeboy.
  build:
    name: Build & Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - 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-

      - name: cargo fmt --check
        run: cargo fmt --check

      - name: cargo clippy
        run: cargo clippy --all-targets -- -W clippy::all

      - name: cargo test
        run: cargo test

  # ── Homeboy audit (dogfooding via homeboy-action) ──
  # Uses source build mode to compile from the PR branch, avoiding the
  # chicken-and-egg problem of needing a released binary to audit itself.
  # Falls back to latest release binary if source build fails.
  # Runs independently of build job so PR comments are always posted.
  # Autofix enabled: on audit failure, applies safe fixes and commits back to the PR.
  audit:
    name: Homeboy Audit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.head_ref }}
          fetch-depth: 0

      - uses: Extra-Chill/homeboy-action@v1
        with:
          source: '.'
          extension: rust
          component: homeboy
          commands: audit
          autofix: 'true'
          autofix-commands: 'audit --fix --write'
          autofix-max-commits: '2'