derive-enum-from-into 0.2.1

Derive for From and TryInto for enums with single fields
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always
  CACHE_PATHS: |

    ~/.cargo/bin/
    ~/.cargo/registry/index/
    ~/.cargo/registry/cache/
    ~/.cargo/git/db/
    target/

jobs:
  validity:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/cache@v4
      with:
        path: ${{ env.CACHE_PATHS }}
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

    - name: Check source is valid
      run: cargo check --workspace

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

    - name: Check formatting with rustfmt
      run: cargo fmt --all --check

    - uses: kaleidawave/release-downloader@improvements
      with:
        items: kaleidawave/simple-toml-parser@canary[format]

    - name: Check 'Cargo.toml' formatting
      run: format Cargo.toml --check

  tests:
    needs: validity
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/cache@v4
      with:
        path: ${{ env.CACHE_PATHS }}
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

    - name: Run all tests
      run: cargo test --workspace --verbose --all-features

  clippy:
    needs: validity
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/cache@v4
      with:
        path: ${{ env.CACHE_PATHS }}
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

    - name: Lint code with clippy
      run: cargo clippy

  publish-ability:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable

      - uses: dorny/paths-filter@v3
        id: changes
        with:
          filters: |

            manifests:
              - '**/*.toml'

      - uses: kaleidawave/release-downloader@improvements
        if: steps.changes.outputs.manifests == 'true'
        with:
          items: kaleidawave/crates-release-gh-action@assets[crates-release]
          
      - name: Check that it will publish to crates.io
        if: steps.changes.outputs.manifests == 'true'
        run: crates-release verify