hocon-parser 1.9.0

Full Lightbend HOCON specification-compliant parser for Rust
Documentation
name: Test
on:
  push:
    branches: [master, develop, main]
  pull_request:
    branches: [master, develop, main]

jobs:
  test:
    strategy:
      matrix:
        rust: [stable, "1.82"]
        os: [ubuntu-latest]
        include:
          - rust: stable
            os: macos-latest
          - rust: stable
            os: windows-latest
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
      # No cache: `make testdata` fetches the fixtures fresh each run (a small
      # tarball). Caching only part of the fixture tree previously left the
      # fetched-only `.conf` files absent on warm-cache jobs (#101 resurfaced),
      # and caching the whole tree would clobber git-tracked fixtures with stale
      # cached copies. Fetching is ~1-2s and always correct.
      - name: Fetch testdata fixtures
        run: make testdata
      - run: cargo test
        if: matrix.rust == 'stable'
      # MSRV: remove criterion dev-dependency before testing because
      # criterion's transitive dep clap_lex requires edition 2024
      - name: Remove bench deps for MSRV
        if: matrix.rust != 'stable'
        run: |
          sed -i '/\[dev-dependencies\]/,/^\[/{/criterion/d}' Cargo.toml
          sed -i '/\[\[bench\]\]/,/^$/d' Cargo.toml
      - run: cargo test
        if: matrix.rust != 'stable'
      - run: cargo test --features serde
        if: matrix.rust == 'stable'

  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
      # No cache — see the test job above.
      - name: Fetch testdata fixtures
        run: make testdata
      - uses: taiki-e/install-action@cargo-llvm-cov
      - run: cargo llvm-cov --features serde --lcov --output-path lcov.info
      - uses: codecov/codecov-action@v5
        with:
          files: lcov.info
          token: ${{ secrets.CODECOV_TOKEN }}
          slug: ${{ github.repository }}
          fail_ci_if_error: false