Merge remote-tracking branch 'origin/claude/codebase-documentation-re… #197
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: domainstack | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| - beta | |
| - 1.76.0 # MSRV | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run tests (all crates) | |
| run: cargo test --all --verbose | |
| - name: Run tests (no default features) | |
| run: cargo test -p domainstack --no-default-features --verbose | |
| - name: Run tests (with regex feature) | |
| run: cargo test -p domainstack --features regex --verbose | |
| - name: Run tests (with derive feature) | |
| run: cargo test -p domainstack --features derive --verbose | |
| - name: Run tests (domainstack-http) | |
| run: cargo test -p domainstack-http --verbose | |
| - name: Run tests (domainstack-axum) | |
| run: cargo test -p domainstack-axum --verbose | |
| - name: Run tests (domainstack-actix) | |
| run: cargo test -p domainstack-actix --verbose | |
| - name: Run examples | |
| run: | | |
| cargo run -p domainstack-examples --example v2_basic | |
| cargo run -p domainstack-examples --example v2_nested | |
| cargo run -p domainstack-examples --example v2_collections | |
| cargo run -p domainstack-examples --example v3_error_envelope_basic | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: domainstack | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: domainstack | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-target-clippy-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| doc: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: domainstack | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Check documentation | |
| run: cargo doc --all --no-deps --all-features | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: domainstack | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate coverage | |
| run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-audit | |
| uses: taiki-e/install-action@cargo-audit | |
| - name: Run cargo-audit | |
| run: cargo audit | |
| working-directory: domainstack |