deepmerge 0.1.0

Deep merge functionality with policy-driven merging and derive macro support
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build-and-test:
    name: build-test (${{ matrix.os }} | ${{ matrix.toolchain }} | features=${{ matrix.profile.features }} | default-features=${{ matrix.profile.default-features }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        toolchain: ["1.85.1", stable, nightly]
        profile:
          - features: ""
            default-features: true
          - features: "alloc"
            default-features: false
          - features: "std"
            default-features: false
          - features: "derive"
            default-features: true
          - features: "serde_json"
            default-features: true
          - features: "toml"
            default-features: true
          - features: "indexmap"
            default-features: true
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Rust ${{ matrix.toolchain }}
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}

      - name: Show versions
        shell: bash
        run: |
          rustc -Vv
          cargo -V

      - name: Cargo fetch
        shell: bash
        run: cargo fetch

      - name: Build workspace
        shell: bash
        run: |
          if [ "${{ matrix.profile.default-features }}" = "true" ]; then
            cargo build --workspace --all-targets --verbose --features "${{ matrix.profile.features }}"
          else
            cargo build --workspace --all-targets --verbose --no-default-features --features "${{ matrix.profile.features }}"
          fi

      - name: Run tests
        shell: bash
        run: |
          if [ "${{ matrix.profile.default-features }}" = "true" ]; then
            cargo test --workspace --all-targets --verbose --features "${{ matrix.profile.features }}"
          else
            cargo test --workspace --all-targets --verbose --no-default-features --features "${{ matrix.profile.features }}"
          fi

  derive-crate:
    name: derive (${{ matrix.os }} | ${{ matrix.toolchain }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        toolchain: ["1.85.1", stable, nightly]
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Rust ${{ matrix.toolchain }}
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}

      - name: Build derive crate
        shell: bash
        working-directory: deepmerge-derive
        run: cargo build --verbose

      - name: Test derive crate
        shell: bash
        working-directory: deepmerge-derive
        run: cargo test --verbose

  lint-and-licenses:
    name: lint-and-licenses
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: clippy, rustfmt

      - name: rustfmt check (workspace)
        run: cargo fmt --all -- --check

      - name: clippy (deny warnings)
        run: cargo clippy --workspace --all-targets -- -D warnings

      - name: Install cargo-deny
        uses: taiki-e/install-action@v2
        with:
          tool: cargo-deny

      - run: cargo deny check