#!/usr/bin/env bash
# Run the full duroxide-cdb test suite.
#
# Pass 1: clippy (all targets, all features)
# Pass 2: nextest with --all-features (includes provider-test validation tests)
#
# Usage:
#   ./run-tests.sh                      # full suite
#   ./run-tests.sh -E 'test(/pattern/)' # forward extra args to nextest
set -eo pipefail

echo "═══════════════════════════════════════════════════"
echo "  Pass 1: cargo clippy --all-targets --all-features"
echo "═══════════════════════════════════════════════════"
cargo clippy --all-targets --all-features -- -D warnings

echo ""
echo "═══════════════════════════════════════════════════"
echo "  Pass 2: cargo nextest run --all-features"
echo "═══════════════════════════════════════════════════"
cargo nextest run --all-features "$@"

echo ""
echo "═══════════════════════════════════════════════════"
echo "  ✓ All passes succeeded"
echo "═══════════════════════════════════════════════════"
