agentic-loop 3.4.1 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ralph/setup.sh +51 -0
package/package.json
CHANGED
package/ralph/setup.sh
CHANGED
|
@@ -26,6 +26,7 @@ ralph_setup() {
|
|
|
26
26
|
setup_claude_md
|
|
27
27
|
setup_mcp
|
|
28
28
|
setup_precommit_hooks
|
|
29
|
+
setup_github_ci "$pkg_root"
|
|
29
30
|
|
|
30
31
|
echo ""
|
|
31
32
|
echo " ========================================"
|
|
@@ -463,3 +464,53 @@ EOF
|
|
|
463
464
|
echo " Then run: pre-commit install"
|
|
464
465
|
fi
|
|
465
466
|
}
|
|
467
|
+
|
|
468
|
+
# Set up GitHub Actions CI/CD
|
|
469
|
+
setup_github_ci() {
|
|
470
|
+
local pkg_root="$1"
|
|
471
|
+
local template_dir="$pkg_root/templates/github/workflows"
|
|
472
|
+
|
|
473
|
+
# Skip if not a git repo
|
|
474
|
+
if [[ ! -d ".git" ]]; then
|
|
475
|
+
return 0
|
|
476
|
+
fi
|
|
477
|
+
|
|
478
|
+
# Skip if templates don't exist
|
|
479
|
+
if [[ ! -d "$template_dir" ]]; then
|
|
480
|
+
return 0
|
|
481
|
+
fi
|
|
482
|
+
|
|
483
|
+
# Skip if already set up
|
|
484
|
+
if [[ -f ".github/workflows/pr.yml" ]] && [[ -f ".github/workflows/nightly.yml" ]]; then
|
|
485
|
+
return 0
|
|
486
|
+
fi
|
|
487
|
+
|
|
488
|
+
echo ""
|
|
489
|
+
echo " GitHub Actions CI/CD can be configured:"
|
|
490
|
+
echo " - PR checks: Fast lint/typecheck on pull requests"
|
|
491
|
+
echo " - Nightly: Full test suite + PRD tests at 3am UTC"
|
|
492
|
+
echo ""
|
|
493
|
+
read -r -p " Set up GitHub Actions? [Y/n] " response
|
|
494
|
+
|
|
495
|
+
if [[ "$response" =~ ^[Nn]$ ]]; then
|
|
496
|
+
echo " Skipped GitHub Actions (run 'ralph ci install' later)"
|
|
497
|
+
return 0
|
|
498
|
+
fi
|
|
499
|
+
|
|
500
|
+
echo "Setting up GitHub Actions CI/CD..."
|
|
501
|
+
|
|
502
|
+
# Create workflows directory
|
|
503
|
+
mkdir -p .github/workflows
|
|
504
|
+
|
|
505
|
+
# Install PR workflow
|
|
506
|
+
if [[ ! -f ".github/workflows/pr.yml" ]]; then
|
|
507
|
+
cp "$template_dir/pr.yml" .github/workflows/pr.yml
|
|
508
|
+
echo " Created .github/workflows/pr.yml (fast PR checks)"
|
|
509
|
+
fi
|
|
510
|
+
|
|
511
|
+
# Install nightly workflow
|
|
512
|
+
if [[ ! -f ".github/workflows/nightly.yml" ]]; then
|
|
513
|
+
cp "$template_dir/nightly.yml" .github/workflows/nightly.yml
|
|
514
|
+
echo " Created .github/workflows/nightly.yml (nightly full tests)"
|
|
515
|
+
fi
|
|
516
|
+
}
|