getargs-derive 0.1.0

Clap-style #[derive] command-line argument parser for no_std and embedded Rust: zero allocation, compile-time help, subcommands. Built on getargs.
Documentation
name: Check

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

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable

      - uses: taiki-e/install-action@cargo-llvm-cov

      - name: Format
        run: cargo fmt --all -- --check

      - name: Clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Documentation
        run: cargo doc --workspace --all-features --no-deps
        env:
          RUSTDOCFLAGS: -D warnings

      - name: Clippy without Features
        run: cargo clippy --all-targets --no-default-features -- -D warnings

      - name: Test without Features
        run: cargo test --workspace --no-default-features

      - name: Test with heapless
        run: cargo test --workspace --no-default-features --features heapless

      - name: Test with alloc
        run: cargo test --workspace --no-default-features --features alloc

      - name: Test with std
        run: cargo test --workspace --no-default-features --features std

      - name: Test and Coverage
        run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

      - name: Upload Coverage to Codecov
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          slug: AlixANNERAUD/getargs-derive
          files: lcov.info
          fail_ci_if_error: true

  msrv:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@1.88

      - name: Test without Features
        run: cargo test --workspace --no-default-features -- --exact --skip ui

      - name: Test with all Features
        run: cargo test --workspace --all-features -- --exact --skip ui

  package:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable

      - name: Version consistency
        run: |
          metadata=$(cargo metadata --format-version 1 --no-deps)
          root=$(echo "$metadata" | jq -r '.packages[] | select(.name == "getargs-derive") | .version')
          macros=$(echo "$metadata" | jq -r '.packages[] | select(.name == "getargs-derive-macros") | .version')
          pin=$(echo "$metadata" | jq -r '.packages[] | select(.name == "getargs-derive") | .dependencies[] | select(.name == "getargs-derive-macros") | .req')
          echo "getargs-derive=$root getargs-derive-macros=$macros pin=$pin"
          test "$root" = "$macros"
          test "$pin" = "=$root"

      - name: Package
        run: cargo package --workspace