dotenv_config 0.2.3

parse `env` to config struct for Rust
Documentation
name: Lint

on:
  push:
    branches:
      - "main"
    paths-ignore:
      - "**.md"
      - LICENSE
  pull_request:
    branches:
      - "*"
    paths-ignore:
      - "**.md"
      - LICENSE
  workflow_dispatch:
  release:
    types: [published, edited]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    name: ${{ matrix.os }} with rust ${{ matrix.toolchain }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        toolchain: [stable, nightly]
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
          - os: macos-latest
            target: x86_64-apple-darwin
          - os: windows-latest
            target: x86_64-pc-windows-msvc
    steps:
      - name: Remove unused tools
        if: startsWith(matrix.os, 'ubuntu')
        run: |
          sudo rm -rf /usr/share/dotnet
          sudo rm -rf /opt/ghc
          sudo rm -rf "/usr/local/share/boost"
          sudo rm -rf "$AGENT_TOOLSDIRECTORY"

      - name: Checkout project
        uses: actions/checkout@v6

      - name: Setup Rust toolchain for stable
        if: matrix.toolchain == 'stable'
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}

      - name: Setup Rust toolchain for nightly
        if: matrix.toolchain == 'nightly'
        uses: dtolnay/rust-toolchain@nightly
        with:
          targets: ${{ matrix.target }}

      - name: Rust Cache
        uses: Swatinem/rust-cache@v2
        with:
          shared-key: "rust"

      - name: Install Rust tools
        run: |
          rustup component add rustfmt clippy
          cargo install cargo-audit cargo-outdated

      - name: Check formatting
        run: cargo fmt -- --check

      - name: Lint with clippy
        run: cargo clippy -- -D warnings

      - name: Audit dependencies
        run: cargo audit

      - name: Check for outdated dependencies
        run: cargo outdated