spherenet-admin 0.3.1

Command-line tool for SphereNet governance and network administration
name: CI

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read

# Cancel superseded runs on the same ref (e.g. new pushes to a PR).
concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    name: fmt, clippy, test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - name: Format
        # Advisory only — reports drift but never fails the build. rustfmt output
        # varies by toolchain version, so gating on it causes spurious failures
        # until the toolchain is pinned. Revisit (pin + enforce) later if desired.
        continue-on-error: true
        run: cargo fmt --all --check
      - name: Clippy
        run: cargo clippy --all-targets --locked -- -D warnings
      - name: Test
        run: cargo test --locked