cviz 2.0.1

A CLI tool to visualize WebAssembly component composition structure.
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    name: Format + Clippy
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

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

      # Caching to increase performance as dependency tree grows
      - uses: Swatinem/rust-cache@v2

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

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

  # Run CLI across OS targets
  build_and_test:
    name: Build + Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable

      # Caching per OS
      - uses: Swatinem/rust-cache@v2

      - name: Build
        run: cargo build --locked --verbose

      - name: Run tests
        run: cargo test --locked --all-features --verbose