From 5535d70ddf4189684d7c5bd9cc9736ff58935315 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Tue, 20 Jan 2026 13:09:09 -0800 Subject: [PATCH] chore(dx): add bash script to run all ci checks locally --- check-all.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 check-all.sh diff --git a/check-all.sh b/check-all.sh new file mode 100755 index 0000000..a0f7f46 --- /dev/null +++ b/check-all.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Function to run a command and check its status +run_check() { + local desc=$1 + local cmd=$2 + + echo -e "\n${YELLOW}Running: ${desc}${NC}" + echo -e "${YELLOW}Command: ${cmd}${NC}" + + if eval "$cmd"; then + echo -e "${GREEN}✓ ${desc} passed${NC}" + return 0 + else + echo -e "${RED}✗ ${desc} failed${NC}" + return 1 + fi +} + +# Track if any checks fail +failed=0 + +echo -e "${YELLOW}🔍 Running all checks for Hikari Desktop...${NC}" + +# Frontend checks +run_check "Frontend lint" "pnpm lint" || failed=1 +run_check "Frontend format check" "pnpm format:check" || failed=1 +run_check "Frontend type check" "pnpm check" || failed=1 +run_check "Frontend tests" "pnpm test" || failed=1 + +# Backend checks +run_check "Backend clippy (strict)" "cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings" || failed=1 +run_check "Backend tests" "cargo test" || failed=1 + +# Summary +echo -e "\n${YELLOW}========================================${NC}" +if [ $failed -eq 0 ]; then + echo -e "${GREEN}✨ All checks passed! The code is looking great!${NC}" + echo -e "${GREEN} Naomi would be so proud of us! 💖${NC}" + exit 0 +else + echo -e "${RED}❌ Some checks failed. Let's fix them together!${NC}" + echo -e "${RED} Don't worry, we'll get through this! 💪${NC}" + exit 1 +fi