name: Comprehensive Test Suite
on:
push:
branches: '**'
pull_request:
branches: '**'
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Run Comprehensive Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ๐ฆ Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy, rustfmt
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
- name: ๐ฆ Install dependencies
run: cargo fetch
- name: ๐งช Run unit tests
run: cargo test --lib --verbose
- name: ๐ง Run integration tests
run: cargo test --test integration_tests --verbose
- name: ๐ Generate test report
run: cargo test --verbose -- --nocapture
- name: ๐ Run all tests with coverage info
run: cargo test --all --verbose