dirk_framework 0.1.1

Dependency Injection for Rust
Documentation
name: dirk - Test

on:
  push:
    branches: [ main, develop ]
    tags:
      - "v*.*.*"
    paths-ignore:
      - '**.md'
  pull_request:
    branches: [ main, develop ]
    paths-ignore:
      - '**.md'

env:
  CARGO_TERM_COLOR: always

jobs:
  Insta:

    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v4
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable
        override: true

    - name: Check Rust version
      run: cargo --version

    - name: Rust Cache
      uses: Swatinem/rust-cache@v2.7.0
      with:
        shared-key: "Insta"
           
    - name: Build
      run: cargo build --workspace --test errors --test examples --verbose
    
    - name: Run tests
      run: cargo test --workspace --verbose --no-fail-fast --test errors --test examples

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

  Doctest:

    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v4
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable
        override: true

    - name: Check Rust version
      run: cargo --version

    - name: Rust Cache
      uses: Swatinem/rust-cache@v2.7.0
      with:
        shared-key: "Doctest"
           
    - name: Build
      run: cargo build --workspace --verbose
    
    - name: Run tests
      run: cargo test --workspace --verbose --no-fail-fast --doc

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

  lints:
    name: Lints
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable
        override: true
        components: rustfmt, clippy


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

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

    - name: Run cargo clippy
      run: |
        cargo clippy --workspace --all-targets -- \
          -Dwarnings \
          -Wclippy::cargo \
          -Wclippy::complexity \
          -Wclippy::correctness \
          -Wclippy::pedantic \
          -Wclippy::perf \
          -Wclippy::style \
          -Wclippy::suspicious \
          -Aclippy::module-name-repetitions \
          -Aclippy::multiple-crate-versions \
          -Aclippy::too_many_lines \
          -Aclippy::type_complexity \
          -Aclippy::match_same_arms \
          -Aclippy::if_not_else \
          -Adead_code