hocon-parser 1.11.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@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
      - uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # master branch, pinned 2026-07-25
        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'
      # The adapter and format-ingestion suites are `#![cfg(feature =
      # "adapters")]`, so every run above compiles them to EMPTY test binaries
      # that pass without asserting anything. Without this step the adapters
      # ship untested — which is exactly how the F1.2 and F3.2 defects reached
      # a release.
      - run: cargo test --all-features
        if: matrix.rust == 'stable'
      # MSRV runs the adapter suites too, which is what keeps `rust-version`
      # honest for EVERY feature combination rather than just the default
      # build. It works because `toml` is capped to its 1.0 line (see
      # Cargo.toml); if a dependency raises its MSRV past 1.82 this job fails,
      # which is the drift detection a documentation-only note could not give.
      - run: cargo test --all-features
        if: matrix.rust != 'stable'

  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
      - uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
      # No cache — see the test job above.
      - name: Fetch testdata fixtures
        run: make testdata
      - uses: taiki-e/install-action@e62b3bdab54265ba809383c8707cb0600da93f19 # cargo-llvm-cov
      # --all-features so the adapter modules are measured too; under
      # --features serde they were reported as uncovered dead code.
      - run: cargo llvm-cov --all-features --lcov --output-path lcov.info
      - uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5
        with:
          files: lcov.info
          token: ${{ secrets.CODECOV_TOKEN }}
          slug: ${{ github.repository }}
          fail_ci_if_error: false