#!/bin/bash
set -e

echo "🔍 Running all checks..."
echo "========================================"

echo ""
echo "📦 Installing dependencies..."
pnpm install

echo ""
echo "🔎 Running ESLint..."
pnpm lint

echo ""
echo "💅 Running Prettier check..."
pnpm format:check

echo ""
echo "🏗️  Building frontend..."
pnpm build

echo ""
echo "🧪 Running frontend tests..."
pnpm test

echo ""
echo "🦀 Running Clippy..."
cd src-tauri
cargo clippy --all-targets --all-features -- -D warnings

echo ""
echo "🧪 Running Rust tests..."
cargo test

cd ..

echo ""
echo "========================================"
echo "✅ All checks passed!"
