granite-cli 0.2.9

CLI for discovering, configuring, and launching AI workflows powered by IBM Granite models.
name: Check

on:
  workflow_call:

jobs:
  check:
    name: fmt / clippy / build / test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # 1.96.1
        with:
          toolchain: 1.99
          components: rustfmt, clippy

      - name: Cache cargo build artifacts
        uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

      - name: Check capability table is up to date
        run: bash scripts/update-capability-table.sh --check

      - name: Check formatting
        run: cargo fmt --all -- --check

      - name: Run Clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Build
        run: cargo build --locked --all-targets --all-features

      - name: Test
        run: cargo test --locked --all-targets --all-features