cargo-bom 0.6.3

Bill of Materials for Rust Crates
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/audit-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

  lints:
    runs-on: ubuntu-latest
    steps:
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          components: rustfmt, clippy

      - uses: actions/checkout@v3
      - uses: Swatinem/rust-cache@v1

      - uses: actions-rs/cargo@v1
        with:
          command: check

      - uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --check --all

      - uses: actions-rs/clippy-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12 ]
        rust:
          - stable
          - beta
          - nightly

    steps:
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true

      - uses: actions/checkout@v3
      - uses: Swatinem/rust-cache@v1

      - uses: actions-rs/cargo@v1
        with:
          command: test

      - uses: actions-rs/cargo@v1
        with:
          command: run
          args: -- bom