47 lines
1.2 KiB
Bash
Executable File
47 lines
1.2 KiB
Bash
Executable File
#!/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"
|
|
|