Initial commit: add .gitignore and README
This commit is contained in:
46
utils/optimize-builds.sh
Executable file
46
utils/optimize-builds.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/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"
|
||||
|
||||
Reference in New Issue
Block a user