#!/bin/bash # Load shared libraries SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$SCRIPT_DIR/../lib/init.sh" # Script to optimize build and test workflows set -e echo "โšก Optimizing build and test workflows..." # Check if Turborepo is configured if [ -f "turbo.json" ]; then echo "โœ… Turborepo configuration found" # Verify cache is working echo "๐Ÿงช Testing build cache..." pnpm build --force || echo "โš ๏ธ Build test skipped" echo "๐Ÿ“Š Build optimization tips:" echo " - Enable Turborepo caching" echo " - Use parallel execution" echo " - Enable incremental builds" echo " - Cache dependencies" else echo "โš ๏ธ Turborepo not configured" echo " โ†’ Consider setting up Turborepo for build optimization" fi # Check for test optimization echo "๐Ÿงช Test optimization:" echo " - Run tests in parallel" echo " - Use test filtering" echo " - Cache test results" echo " - Use test sharding for CI" # Check CI/CD configuration if [ -d ".github/workflows" ]; then echo "โœ… GitHub Actions workflows found" echo " โ†’ Review workflows for optimization opportunities" fi echo "" echo "๐Ÿ“ See docs/BUILD_OPTIMIZATION_GUIDE.md for detailed optimization strategies"