pddl 0.2.0

A PDDL 3.1 parser, strongly typed
Documentation
---
name: Rust

on:
  push:
    branches: [ "main" ]
    paths:
      - 'Cargo.toml'
      - 'Cargo.lock'
      - 'src/**'
      - '.github/workflows/rust.yml'
  pull_request:
    branches: [ "main" ]
    paths:
      - 'Cargo.toml'
      - 'Cargo.lock'
      - 'src/**'
      - '.github/workflows/rust.yml'

env:
  CARGO_TERM_COLOR: always

jobs:
  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - name: Run clippy
        run: cargo clippy --all-features --tests -- -D warnings

  msrv:
    name: MSRV
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: "1.80.0"
      - name: Build with MSRV
        run: cargo build --all-features
      - name: Test with MSRV
        run: cargo test --all-features

  build:
    name: Build and Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest, windows-latest  ]
    steps:
      - uses: actions/checkout@v6
      - name: Check format
        run: cargo fmt --check
      - name: Build
        run: cargo build --verbose
      - uses: taiki-e/install-action@nextest
      - name: Run tests
        run: cargo nextest run --verbose --all-features
      - name: Run doctests
        run: cargo test --doc --verbose --all-features

  codecov:
    name: Code Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Build
        run: cargo build --verbose
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: Install nextest
        uses: taiki-e/install-action@nextest
      - name: Generate code coverage
        run: cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v6.0.0
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: lcov.info
          fail_ci_if_error: true