braze-sync 0.8.0

GitOps CLI for managing Braze configuration as code
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

# Third-party actions are pinned by commit SHA (with a trailing
# version comment) per GitHub's hardening guidance. To bump a pin,
# resolve the new tag with `gh api repos/<owner>/<repo>/git/ref/tags/<tag>`
# and, if `.object.type == "tag"` (annotated), dereference once more
# via `gh api repos/.../git/tags/<sha>` to get the commit SHA.
jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
      - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
      - run: cargo test --all-features

  msrv:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: dtolnay/rust-toolchain@dd44c20b1206a46e25fba8503d5d7c9a33bd355a # 1.86
      - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
      - run: cargo check --all-features

  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
        with:
          components: clippy, rustfmt
      - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
      - run: cargo fmt --check
      - run: cargo clippy --all-targets --all-features -- -D warnings

  audit:
    runs-on: ubuntu-latest
    # `rustsec/audit-check` posts findings via the GitHub Checks API, which
    # requires `checks: write`. Without this the job fails with
    # "Resource not accessible by integration" even when the advisory scan
    # itself succeeds. `contents: read` is kept explicit so the default
    # permission set does not widen unexpectedly.
    permissions:
      contents: read
      checks: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
        with:
          token: ${{ github.token }}

  deny:
    # `cargo-deny` covers the supply-chain checks `audit` doesn't:
    # license allow-list, duplicate/wildcard version bans, and
    # allowed-registry enforcement. Configuration lives in `deny.toml`.
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: EmbarkStudios/cargo-deny-action@a4d2d701318fdc1c6ae17ba8cea8f329c5110eb2 # v2.0.17
        with:
          command: check
          arguments: --all-features