canon-json 0.2.1

serde_json Formatter to serialize as RFC 8785 canonical JSON
Documentation
# Copied originally from https://github.com/coreos/repo-templates

name: Rust
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
permissions:
  contents: read

# don't waste job slots on superseded code
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always
  # Pinned toolchain for linting
  ACTIONS_LINTS_TOOLCHAIN: 1.86.0

jobs:
  tests-stable:
    name: Tests, stable toolchain
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v4
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@v1
        with:
          toolchain: stable
      - name: Cache build artifacts
        uses: Swatinem/rust-cache@v2
      - name: cargo build
        run: cargo build --all-targets --all-features
      - name: cargo test
        run: cargo test --all-targets --all-features
      # https://github.com/rust-lang/cargo/issues/6669
      - name: cargo test --doc
        run: cargo test --doc --all-features
  linting:
    name: Lints, pinned toolchain
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v4
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@v1
        with:
          toolchain: ${{ env.ACTIONS_LINTS_TOOLCHAIN }}
          components: rustfmt, clippy
      - name: Cache build artifacts
        uses: Swatinem/rust-cache@v2
      - name: cargo fmt (check)
        run: cargo fmt -- --check -l
      - name: cargo clippy (warnings)
        run: cargo clippy --all-targets --all-features -- -D warnings