ci.sh 871 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. set -eu
  3. # Run this from anywhere; normalize to repo root (parent of this script dir)
  4. SCRIPT_DIR="$(dirname "$0")"
  5. cd "${SCRIPT_DIR}/.."
  6. # Ensure Bun is available
  7. if ! command -v bun >/dev/null 2>&1; then
  8. echo "bun is not installed or not in PATH" >&2
  9. exit 1
  10. fi
  11. # Install dependencies (similar to what setup-bun/action does)
  12. if [ -f "bun.lock" ] || [ -f "package.json" ]; then
  13. echo "Running bun install..."
  14. bun install
  15. fi
  16. # Mirror the main GitHub CI steps (excluding format job for local runs)
  17. # 1) From .github/workflows/test.yml
  18. echo "Running bun turbo typecheck..."
  19. bun turbo typecheck
  20. echo "Running bun turbo test..."
  21. bun turbo test
  22. # 2) From .github/workflows/typecheck.yml
  23. # (PRs to dev): bun typecheck
  24. # Running it here ensures it also passes locally
  25. echo "Running bun typecheck..."
  26. bun typecheck
  27. echo "✅ Local CI checks finished"